pip not found after installation - python

I installed 'pip' on python, after it tells me that I don't have pip:
Here it tells me that the installation was ok:
But then I'm trying to install this:
but it tells me:
Why 'pip' not found?
EDIT: a picture for Lewis's answer :
Screenshot number 5:

If you have easy_install installed try running: sudo easy_install pip in your terminal and restarting PyCharm.
I see you are using an old version of Python (or at least have it installed). Try running pip3 install name_of_package if you are looking to install through python 3.

Seems that the script is being run from the wrong place. Try to run it from the regular terminal. Remember to get higher privilege,or pip may fail.

Related

Installing packages in Python 3.8 - pip fatal error, seems to be stuck on 3.6 somehow

I am running Python 3.8.3. Previously I had Python 3.6 installed.
When I try to install by pip e.g.
pip install requests
I get the error
Fatal error in launcher: Unable to create process using '"c:\users\myname\appdata\local\programs\python\python36\python.exe" "C:\Users\MyName\AppData\Local\Programs\Python\Python36\Scripts\pip.exe" install requests'
Uninstalling Python 3.6 did not resolve this. I also tried reinstalling pip from https://pypi.org/project/pip/#files.
How can I get pip working again so I can install packages again?
On a side note, the reason I installed 3.8.3 in the first place instead of continuing with 3.6 was that Windows opened its app store any time the python command was used in PowerShell. I figured I might as well download the new version, since at the time I saw no reason to fight it. Still, it would be nice to know how to stop Windows from commandeering this.
If typing python in your command prompt opens python 3.6 then try py -3 or another possible PATH variable you have set for python 3.8
then to use pip for just that python version do the following command
[PATH VARIABLE] -m pip install [py-package]
e.g.
python -m pip install requests
When you are runing pip install requests, it runs the first pip it finds on th path. You can see from the error message, that it is using c:\users\myname\appdata\local\programs\python\python36\python.exe, so you are not really installing anything for Python 3.8.
If running python on your computer runs Python 3.8, then I suggest using this option to run pip:
python -m pip install requests
And if you have to enter full path to start python3.8, than do that:
/full/path/to/python.exe -m pip install requests

How do I install selenium without pip?

I need to install a package, Selenium, for python, but when I run ’pip install selenium’ in my command prompt, it says that ’ pip is not recognized as an internal or external command,
operable program or batch file’. I have added my pip path to PATH variables, and I have made sure that pip is installed properly. I have reinstalled python to make sure that pip is installed, and repaired python in case there were missing components or something. I have tried running ’py -m pip install selenium’, and it says that selenium is already installed, but when I run my code it says that there is no module named selenium. I have two different python programs, this python and Anaconda;Spyder. When I install selenium on Spyder, it works, but when I run the code it doesn’t work, not showing any errors. Can you help me
Do you maybe have multiple python versions on your system like for example python2.7 and python3.8?
Maybe you could try using
pip3 install ...
python3 -m install ...
python -m pip install ...
That worked for me. Could you also share your error.
Are you using macOS?
I ran into a similar issue a while back, try:
pip3 install selenium

Pillow is installed, but still getting "ImportError: No module named PIL"

I did find this question asked by few more people, but none of those exactly met my situation, so asking here myself.
I've (rather had) two versions of Python (2.7 and 3.4.3) on my Mac running the latest MacOS High Sierra. As I understand, the v2.7 comes as default installation with the MacOS. And I installed the 3.4.3 (from .dmg file downloaded from the python site). Thus now, the python command defaults to the 2.7, while python3 points to the 3.4.3 in the terminal.
While trying to learn, I tried a python script that uses
import PIL and from PIL import Image
But when running, this gave the error ImportError: No module named PIL.
Upon research on google, I figured out to install PIL and Pillow using
sudo pip install Pillow
It installed correctly, but I'm still getting the same error.
To remove the confusion, I decided to remove the python 3.4.3 from the system. But even after it's removed, I still get the same error.
Even pip list displays Pillow 5.1.0 alright.
So right now, I've only Python 2.7, and the error persists, while Pillow is also in there.
which python gives /opt/local/bin/python as the path.
Does any of the above ring a bell? Any ideas, what else could be missing here?
Phew, finally found the issue. Thanks #Yash for the pointers.
Incidentally I did a which -a python and surprisingly got this output:
/opt/local/bin/python
/usr/bin/python
Damn, I don't remember when I installed a second 2.7 version on the /opt/local/bin folder (probably via macports). Alright, removed the confusion, deleted this python, so now I'm left only with the system installed python at /usr/bin.
And now the imports all run perfectly fine as expected. :-)
Try this,
sudo pip install image
I hope it works! One more thing, do check if you're running python3 filename.py instead of python filename.py, if you want to install it for Python 3, run the command,
sudo pip3 install Pillow
Basic Installation:
pip install Pillow
Windows Installation:
pip install Pillow
Reference: https://pillow.readthedocs.io/en/stable/installation.html
Try this. It worked for me
pip install --upgrade --force-reinstall pillow
If you get something like access denied error run the below command
pip install --upgrade --force-reinstall pillow --user

pip install .\scipy-0.16.1-win32-superpack-python3.4.exe

I issue a command to install scipy see below
PS C:\Users\yosief\Downloads> pip install .\scipy-0.16.1-win32-superpack-python3.4.exe
and I get an error-traceback
Invalid requirement: '.\scipy-0.16.1-win32-superpack-python3.4.exe'
It looks like a path. Does it exist?
My ENV variable is set so I can issue pip install from
C:\Users\yosief\Downloads>
even though my python path is:
C:\Users\yosief\AppData\Local\Programs\Python\Python36-32
Thanks
There might be nothing wrong with the file path. Your problem is with the package you are attempting to install.
This will fail because You are running Python 3.6 and you are attempting to install a Python 3.4 package.
You have three options to fix this problem:
1) Just try pip install and the package name you want. No need to download first it does it for you!
OR:
2) Get the correct file. From what I see you are running it should be a 32bit Windows 3.6 (or 36) version package. Everything must match
3) If you can't find your version but the package is Python 3 supported you can download the source and run python setup.py install and it should install.

Module installation in python returning "Could not find any downloads that satisfy the requirement" error?

Unfortunately I cannot install any modules on python 3.4 32 Bit using the pip command due to the following error.
How do I get around the problem. I have removed all other installations of python and have installed the 32 Bit version rather than the 64 Bit one?
Thanks
Edit 1:
At the moment I can't even upgrade pip
Edit 2
Unfortunately it still returns an error.
Try upgrading your pip with
python -m pip install -U pip
If this fails too, it has to be a network problem. See if you're properly connected to internet.
Seems like you might be using an old version of PIP which is facing SSL certification issues and is hence unable to connect. You can do a manual reinstall of pip using these commands.:
python -m pip uninstall pip setuptools
Then, download this script
Finally, run the script with:
python get-pip.py

Categories

Resources