AttributeError: 'module' object has no attribute 'random' when running python in Atom
<p>my code is:</p>

<pre><code>import random
import numpy

z = numpy.zeros(5)
print(z)
d = random.random()
</code></pre>

<p>and the error is: </p>

<pre><code>Traceback (most recent call last):
  File "/Users/wjxiz/Documents/et5/bigdata/test.py", line 6, in &lt;module&gt;
    d = random.random()
 AttributeError: 'module' object has no attribute 'random'
</code></pre>

<p>I hava already installed "scripts" to run scripts in atom. 
I installed my python3 by Homebrew and my path is:</p>

<pre><code>/usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/TeX/texbin
</code></pre>

<p>when I type which python3 and which python in terminal:</p>

<pre><code>/usr/local/bin/python3
/usr/bin/python
</code></pre>

<p>I can run normal code correctly but when I import random, problem occurs.</p>