install issue - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: install issue (/thread-8753.html) |
install issue - gmeyers - Mar-05-2018 I downloaded the macosx version 3.6.4 and installed it by clicking the donwn-loaded pkg . However when I run a simple script that worked with 2.7 it fails importing import matplotlib and numpy with "ModuleNotFoundError" error. What else is necessary for the install to find the packages. RE: install issue - snippsat - Mar-06-2018 Doing it Right Quote: gmeyers Wrote:However when I run a simple script that worked with 2.7 it fails importing import matplotlib and numpy with "ModuleNotFoundError" error. What else is necessary for the install to find the packages.You most pip install into Python 3.Check that pip or pip3 point to python 3.mint@mint ~ $ pip -V mint@mint ~ $ pip3 -V # Install pip install numpy pip install -U matplotlib Alternative pyenv is the best version management to use, and safe it do not mess with system Python installation. Examle Linux,work the same on Mac. # Install mint@mint ~ $ pyenv install 3.6.4 Downloading Python-3.6.4.tar.xz... -> https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz Installing Python-3.6.4... Installed Python-3.6.4 to /home/mint/.pyenv/versions/3.6.4 # Set python and pip to point to 3.6.4 mint@mint ~ $ pyenv global 3.6.4 mint@mint ~ $ python -V Python 3.6.4 mint@mint ~ $ pip -V pip 9.0.1 from /home/mint/.pyenv/versions/3.6.4/lib/python3.6/site-packages (python 3.6) # Finish |