In general, don’t do this:
pip install package
because, as you have correctly noticed, it’s not clear what Python version you’re installing package
for.
Instead, if you want to install package
for Python 3.7, do this:
python3.7 -m pip install package
Replace package
with the name of whatever you’re trying to install.
Took me a surprisingly long time to figure it out, too. The docs about it are here.
Your other option is to set up a virtual environment. Once your virtual environment is active, executable names like python
and pip
will point to the correct ones.
Related Posts:
- How to install python3 version of package via pip on Ubuntu?
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/
- Install pip for python 3.5
- How do I update\upgrade pip itself from inside my virtual environment?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to install pip with Python 3?
- How to update/upgrade a package using pip?
- bash: pip: command not found
- How to uninstall a package installed with pip install –user
- ImportError: No module named pip
- ImportError: No module named pip
- How can I install pip on Windows?
- ImportError: No module named tensorflow
- Where is BeautifulSoup4 hiding?
- How to find which version of TensorFlow is installed in my system?
- error: command ‘gcc’ failed with exit status 1 while installing eventlet
- error: command ‘gcc’ failed with exit status 1 while installing eventlet
- Where does pip install its packages?
- Could not install packages due to an EnvironmentError:
- Could not find a version that satisfies the requirement tensorflow
- “Defaulting to user installation because normal site-packages is not writeable” python message
- Could not find a version that satisfies the requirement tensorflow
- How to install pytorch in Anaconda with conda or pip?
- Can’t fix “zipimport.ZipImportError: can’t decompress data; zlib not available” when I type in “python3.6 get-pip.py”
- Configuring so that pip install can work from github
- Conda uninstall one package and one package only
- Error after upgrading pip: cannot import name ‘main’
- filename.whl is not supported wheel on this platform
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- Permission denied error by installing matplotlib
- ImportError: cannot import name main when running pip –version command in windows7 32 bit
- filename.whl is not a supported wheel on this platform
- E: unable to locate package pip
- What is the difference between pip and conda?
- bash: pip: command not found
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How to know the version of pip itself
- How to install pip3 on Windows?
- “ImportError: no module named ‘requests'” after installing with pip
- ModuleNotFoundError: No module named ‘matplotlib’
- error: Unable to find vcvarsall.bat
- pg_config executable not found
- How can I install Python’s pip3 on my Mac?
- setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
- Could not find a version that satisfies the requirement
- No module named pkg_resources
- What is the purpose of “pip install –user …”?
- How to upgrade all Python packages with pip
- How do I remove all packages installed by PIP?
- What is the easiest way to remove all packages installed by pip?
- ‘pip3’ is not recognized as an internal or external command, operable program or batch file
- How to tell if tensorflow is using gpu acceleration from inside python shell?
- Using Pip to install packages to Anaconda Environment
- How to install multiple python packages at once using pip
- How are Pipfile and Pipfile.lock used?
- Checking whether pip is installed?
- AttributeError: Module Pip has no attribute ‘main’
- pg_config executable not found
- ‘Pip’ is Not Recognized as an Internal or External Command windows 10 CMD
- How to reinstall a pip package even if it exists
- No module named “Torch”
- Why does “pip install” inside Python raise a SyntaxError?
- clang error: unknown argument: ‘-mno-fused-madd’ (python package installation failure)
- ‘pip install’ fails for every package (“Could not find a version that satisfies the requirement”) [duplicate]
- How do I install a pip package globally instead of locally?
- python mpl_toolkits installation issue
- Pipenv: Command Not Found
- Pip – Fatal error in launcher: Unable to create process using ‘”‘
- pip install -r requirements.txt [Errno 2] No such file or directory: ‘requirements.txt’
- pip: no module named _internal
- Zsh: Conda/Pip installs command not found
- ImportError: No module named ‘yaml’
- Find which version of package is installed with pip
- How to run Pip commands from CMD
- How to install PyGame on Python 3.4?
- Django Rest Framework — no module named rest_framework
- python NameError: name ‘file’ is not defined
- ImportError: No module named ‘xlrd’
- No module named ‘openpyxl’ – Python 3.4 – Ubuntu
- pip3 error – ‘_NamespacePath’ object has no attribute ‘sort’
- ImportError: No module named Crypto.Cipher
- Python 3.6 No module named pip
- How to fix error “ERROR: Command errored out with exit status 1: python.” when trying to install django-heroku using pip
- How to change pip installation path
- pip throws TypeError: parse() got an unexpected keyword argument ‘transport_encoding’ when trying to install new packages
- Why am I getting ImportError: No module named pip ‘ right after installing pip?
- ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
- How to completely uninstall python 2.7.13 on Ubuntu 16.04
- How to install Openpyxl with pip
- Failed building wheel for Twisted in Windows 10 python 3
- Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later
- How to resolve “ImportError: DLL load failed:” on Python?
- How to install numpy to Python 3.5?
- How to install PyQt4 on Windows using pip?
- How do I install pip on macOS or OS X?
- How to install PyQt4 on Windows using pip?
- Pip: could not find a version. No matching distribution found
- File “/usr/bin/pip”, line 9, in
from pip import main ImportError: cannot import name main - How do I list the files associated with a Python package installed using pip or easy_install?