Pip mods don't seem to install - python

So I just downloaded Python 3.6.1 now using pip I tried to download matplotlib.
pip install --user matplotlib
After it's "successful" download I open Python EDGE, import matplotlib only to receive this message.
NameError: name 'matplotlib' is not defined
Could previously using pip on Python 3.5 be the problem?

Install with exactly your version of Python:
python3.6 -m pip install --user matplotlib
or
C:\Python36\python.exe -m pip install --user matplotlib
The probmle is that pip could use a different version of Python.

Related

How to fix pip error "Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')"?

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.

How to import matplotlib in python?

I'm trying to import matplotlib to python 3.7, but I keep getting
ModuleNotFoundError: No module named 'matplotlib'
despite the fact that I downloaded it in my Anaconda Prompt (Anaconda3) using
python -m pip install -U pip
python -m pip install -U matplotlib
What am I doing wrong here? And how get I get matplotlib
You are using Python 3.7, so the Python packages need to be compatible with Python 3.x, not Python 2.x. Run the following commands.
python3 -m pip install -U pip
Print the pip3 version to verify the installation:
pip3 --version
Install matplotlib:
pip3 install -U matplotlib
first install pip via get-pip.
Then install matplotlib by this command pip install matplotlib
NOTE:type all these commands first in powershell or cmd and then try it on your IDE's console.
NOTE2: In case you don't know how to download get-pip, simply right-click and click on save as.... button once after you clicked on the link included above, and then save it in your Desktop, Then go to powershell using cd C:/Users/(You'r username)/Desktop and then run python get-pip.py command, when you made sure that pip is fully installed in powershell or cmd, then you can install it in your IDE's console for once and then run pip install matplotlib or python -m pip install -U pip
python -m pip install -U matplotlib as you suggested.
NOTE3:I Guess if all what I said above possibly may not work, you must uninstall python and reinstall it again, But with one difference, YOU MUST enable python add to path at the beginning of installation so that all what I said above works for you flawlessly

problems with pip install mac OS X

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?

Pip install not working?

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>

Trouble with installing pip 8.1.1 from 7.1.2

I'm having an issue with upgrading pip from 7.1.2 to 8.1.1. At first I downloaded Python 3.4 and installed pip from there but then noticed Python 3.5 was there so I downloaded that. When trying to use pip to install selenium it says You are using pip version 7.1.2 however 8.1.1 is available. I do "pip install --upgrade pip" then get an error. See attached screenshot.What do I do? Btw I'm on windows 8.1.enter image description here
Ok. It's working if I run cmd as an admin then do
python -m pip install --upgrade pip
In Mac, I ran:
sudo python -m pip install --upgrade pip
Then, it worked.
Did you try python -m pip install --upgrade pip? if pip is being used, it cannot install itself.
This is a common question that requires few germane steps to pre-installing other modules in Python.
Depending on the version of your Python (Either the 2.X series or the 3.X series), and the operation system (Window, Ubuntu, etc ), you will need to do the following;
Open CMD (Short-Cut: Control+R button on the keyboard)
Make sure the current directory is the administrator on the hard-drive of the system and your internet connection is available.
i.e C:\Users\System_Name PC
Type in the command:
Pip install --upgrade pip
i.e C:\Users\System_Name PC > pip install --upgrade pip
and hit ENTER key to activate:
It will uninstall the previous version and install the latest version
Restart the system and continue the installation of each python module
e.g Pip install dateutil
Pip install numpy
Pip install matplotlib
Peradventure you wish to specify the version of the python module dependencies you want to install;
Pip install Django==1.90
It will install the specific version: otherwise if not specified, the latest version of the target module would be installed.

Categories