简体   繁体   中英

Python Installing Modules on Mac OS

I am new to Python and terminal prompts/installs and I keep running into installation errors when trying to install modules like Pandas.

I have successfully installed "pip install pandas" I am unable to install this with pip3 however.

Collecting pandas
  Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas 

I have pip3 installed and python3(this comes with mac os). I do not understand the conflict between the versions. If I install using pip, its only compatible with python2? Why wouldnt I be able to install it using pip3 (see error above)?

Am I somehow installing in the wrong directories or not making the correct distinction for python3 and pip3 version compatibility? Thanks for any insight.

As already said in the comments, pip installs modules for python2. Also, you can't run pandas as a command on the shell.

pip3 install pandas works for me, on python3 (v3.7.4), which was installed directly from a Mac installer package on the python website . No 'environment configuration' was required.

>pip3 install pandas
Collecting pandas
  Downloading https://files.pythonhosted.org/packages/ab/ba/f97030b7e8ec0a981abdca173de4e727b3a7b4ed5dba492f362ba87d59a2/pandas-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl (9.8MB)
    100% |████████████████████████████████| 9.8MB 2.8MB/s 

If you've installed python3 using some different method, then you may need to install packages differently or configure your python installation in some way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM