When I try to install anything with (for example) python3 -m pip install numpy
, I get
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
I've tried upgrading pip3 with python3 -m pip install --upgrade pip
but have only gotten
Requirement already up-to-date: pip in
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-
packages
and when I do python3 -m pip --version
I get
pip 7.1.2 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)
I'm unable to install any modules at all. Any advice? I am on MacOS.
To solve your problem, I suggest you use brew as the package manager and install python, not as binary from the python.org but binary using brew ( https://brew.sh ), I hope it'll fix your troubles, during the installation process.
Install brew package manager:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"
Install " python3 " on your machine ( python2 can be installed in the same way ):
$ brew install python3
Check what version of python you are using:
$ which python3
Output ( should look like ): /usr/local/bin/python3
Check what pip you are using:
$ which pip3
Output ( should look like ): /usr/local/bin/pip3
Then you can install any package using "pip" :
$ pip3 install virtualenv
Verify that package was installed :
$ pip3 freeze | grep virtualenv
Update pip manually, first download pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
and then run the command
python3 get-pip.py
Now you can install with pip3
pip3 install numpy
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.