No module named statistics.distributions
<p>I was trying to use Sympy stats library when i encountered this problem:</p>

<pre><code>&gt;&gt;&gt; from sympy.statistics.distributions import Sample
Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
ImportError: No module named statistics.distributions
</code></pre>

<p>The problem is not only in my system as the same happened in their SymPy Live Shell. You can see it <a href="http://docs.sympy.org/0.7.2/modules/statistics.html#sample" rel="nofollow">here</a>. Can you please help me fix this.</p>

<p><code>sympy.statistics</code> has been removed in favor of <code>sympy.stats</code>. Here is the documentation: <a href="http://docs.sympy.org/latest/modules/stats.html" rel="nofollow">http://docs.sympy.org/latest/modules/stats.html</a>. </p>

<p>For producing the mean of a list of numbers, you can use <code>DiscreteUniform</code>:</p>

<pre><code>In [8]: from sympy.stats import DiscreteUniform, E

In [9]: X = DiscreteUniform("X", [1, 2, 3])

In [10]: E(X)
Out[10]: 2
</code></pre>

python python-3.x statistics sympy