I tend to run my code in Jupyter notebooks, and these run in python 3. I also have python 2 on my computer. I installed pip3
so I'd be able to install packages specifically for python 3 but this doesn't seem to be working out for me:
mba$ pip3 install multidict
Collecting multidict
Using cached multidict-2.1.2.tar.gz
Building wheels for collected packages: multidict
Running setup.py bdist_wheel for multidict ... done
Stored in directory: /Users/mba/Library/Caches/pip/wheels/6e/f3/6a/c1ff64511c3dc2964ade4f9e59f4d7dfc050bd77e0fcc78ca5
Successfully built multidict
Installing collected packages: multidict
Successfully installed multidict-2.1.2
mba:~ $ python3
Python 3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import multidict
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'multidict'
>>> import sys.
File "<stdin>", line 1
import sys.
^
SyntaxError: invalid syntax
>>> import sys
>>> sys.version
'3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12) \n[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]'
>>>
Notice that the multidict
install with pip3
succeeded, but when I ran python3
and tried to import multidict
, this failed. How can I install the proper Python 3 version of the package I want?
For reference, I'm on Mac OS X El Capitan. I've read the existing SO posts and tried following the advice in these:
These have not done the trick. Thanks for any suggestions.