Im trying to install a library for python 2.7 on mac
so i enter the command:
python -m pip install pyttsx
and the answer was /usr/bin/python: No module named pip
so i tried this to prove that pip exist
and it shows me that pip exist, so where is pip and why terminal says me that pip doesn't exist?
How can i fix it?
Related
In a virtual environment I get the error
path/to/python: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')
when I run commands like
python -m pip install --upgrade pip
python -m pip freeze
However, when I run the same command with pip it works, e.g.
pip install --upgrade pip
pip freeze
python is the same as python3, version is 3.8.12, I reinstalled pip using
pip install --force-reinstall pip
pip version is 21.3.1.
What else can I do so the python -m pip commands work again?
Well, the problem is that a version 60.3.0 is being used, which has a bug. But you cannot install a different version of setuptools, because you have already installed version 60.3.0.
Solution: Wait for version >60.3.0
On 7 Jan 2022 Version 60.3.1 has been released, which fixed the problem in the question.
I am on a MAC OS 10.15.6
I am having a tough time with virtualenv for python3.
The error I keep getting
ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
It pops up when I run the following command (among others)
python3 -m virtualenv
What I have tried
Pip installing virtualenv with sudo
Regular pip install, normal permissions
Using the pip install --user option
Trying older versions of virtualenv (20.0.23)
Trying newer version of virtualenv (20.0.31)
Any leads are appreciated.
Exactly same problem!
I uninstalled virtualenv, and now it works!
pip uninstall virtualenv
I don't know why
Maybe python now comes with a built-in version of virtualenv?
I'm on python 3.8
I installed python3 from the official website and then installed jupyter notebook. While trying to run jupyter notebook, I was getting a "command not found" error.
I found this github issue and followed the instructions to delete python3 and reinstall using Homebrew instead (I've used Homebrew before).
When trying python3 -m pip install --upgrade pip i get a "No module named pip" error. My /usr/local/bin/ file shows pip, pip2, pip2.7, pip3, pip3.6.
I have a feeling my pip is not associated with the python3 that I installed using Homebrew. How can I fix this?
This way is a pretty fool-proof way to install pip for a specific python interpreter, when you have a big mess of them on the machine:
$ curl https://bootstrap.pypa.io/get-pip.py > /tmp/get_pip.py
$ my_python_interpreter /tmp/get_pip.py
Then:
$ my_python_interpreter -m pip install some_dist
I've been using Ubuntu 17.04 but my pip install is not working. Pip3 works fine and I've been getting by using python3 but I want to use volatility plugins with vol.py and I need python2 for that.
pip install just runs normally and installs everything fine but when I import it it says it's not installed. And yes I've tried using pip2, python -m pip, etc-- python -m pip just gives some error about no zlib when I've already installed it (zlib package thing). Help?
You can specify which version of python you want to use
Try this
python3.6 -m pip install <package>
or
python3 -m pip install <package>
OSX: 10.9.5
PyCharm: 4.5
I am working on project in PyCharm IDE, using the 2.7.3 Python interpreter and need to import thepsycopg2 module. I tried to install the module with PyCharm, but it failed and asked me to do it manually:
Image of error message
So I typed that command in the bash shell, the module installed and now it shows up in the project interpreter 2.7.2 but not in 2.7.3 !!!!!
Maybe the pip version is too old? I upgraded pip from the bash shell: pip install --upgrade pip
python 2.7.2 shows version 7.1.0
python 2.7.3 shows version 1.5.6
You should open Preferenes > Project: (projectname) > Project Interpreter.
Choose the interpreter you want from the dropdown. If you have installed Python with Homebrew, as I have, then you maybe want to choose one of the python interpreters from the Cellars to ease usage of other packages you may have installed with Homebrew.
It might simply be that your system doesn't have pip installed, only pip3.
My system only showed me having pip3 not pip.
Use which pip3 and which pip to see if you have either.
I decided to update pip3, first trying pip3 install --upgrade pip3 which, oddly, returned: ERROR: No matching distribution found for pip3
Next, I ran pip3 install --upgrade pip and now PyCharm can install packages from the GUI.
You didn't specify what pip version you have. My guess is that the pip version is too old and PyCharm passing some flag which returns deprecation warning which cause it to fail. Try updating pip: pip install --upgrade pip