When I create an anaconda virtualenv and install things with pip inside of it, it seems to run into errors which might indicate that its using python 2?
conda create -n tensorflow-3.5 python=3.5 ipykernel
source activate tensorflow-3.5
pip install matplotlib
(tensorflow-3.5) devs-MacBook-Pro:Documents conduce-laptop$ python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar 6 2017, 12:15:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/conduce-laptop/anaconda2/envs/tensorflow-3.5/lib/python3.5/site-packages/matplotlib/__init__.py", line 115, in <module>
import tempfile
File "/Users/conduce-laptop/anaconda2/envs/tensorflow-3.5/lib/python3.5/tempfile.py", line 45, in <module>
from random import Random as _Random
ImportError: bad magic number in 'random': b'\x03\xf3\r\n'
Why is this happening? How should I install modules instead? Do I need to use pip3 instead?