I recently downloaded and installed Python 3.9 because I wanted to run a website scraper to more easily organize recipes found online. However, when I try to run pip it says it doesn't recognize it (and I have tried editing the path but every video or site I find has different information).
Even a basic check of my Python version comes back with no results:
I have uninstalled and reinstalled Python 3.9 but to no avail. There is also no scripts file within my python file and my computer doesn't even seem to recognise that Python is installed.
In python 3.9 you can add below path(scripts path) to your environment variable
C:\Users\ASUS\AppData\Local\Programs\Python\Python39\Scripts
Once the path is added, open a fresh CMD window and type pip --version.
You can see your pip version pip 20.2.4
I found that for Python 3.9 if you enter the command as py -m pip install, the installation initiates as expected.
Annotation 2021-06-17 121518_install pywinauto Visual Studio Code terminal
I finally can use pip install.
Here is how I do it:
Run python 3.6.9-adm64.exe
Choose Modify
Tick all boxes and click Next
Tick [Create shortcuts...appplication](not important) and Add Python to environment variables and click Install
Now run CMD and type:
py -m pip install (name) //pygame for example
Now I installed pygame easily.
I have fixed this issue by running apt-get install python3-pip
on my Debian Linux.
every video or site I find has different information
This may be due to the fact that those sites provide information for different Python versions.
As Alfie Hanks already pointed out in the comments: The right way to do it is to check the box Add Python 3.x to PATH when installing Python 3 for the first time. When re-running the installer / re-installing choose "Modify" and check the box Add Python to environment variables. That takes care of setting the correct environment variable so that the Python and pip binary can be found by Windows.
If you have trouble finding those options, take a look at circlepi314's answer to a similar Python question: https://stackoverflow.com/a/54029728/6710751 This one has screenshots of the installer where those options are marked.
Install python again and when the prompt window opens, click on the modify button. Then check if pip is checked. If not then check it and then proceed with the install.enter image description here
If it still doesn't work, simply uninstall python. And then when you reinstall it make sure that the ADD to path checkbox is checked.
I had the similar problem, I managed to solve it with the following:
I installed python 3.9 by Brew on my Mac, so the pip3 was broken
I resolved by uninstalling python3.9 and installing 3.8
Related
Today, I was trying to install Python 3.10.1.
I was successful in this, but, then, as I was installing Flask, pip will tell me that it installed, then, when I run the script, it says nothing is installed.
After a while, I realized I was running my Python scripts in Python 3.10.1, but I was running pip in Python 3.7. I did as this post said and ran pip --version to discover this.
I ran pip show flask to see where the module is, and it's in the Python 3.7 folder.
However, when I tried to uninstall Python 3.7, I can't find it in my start menu or in Control Panel > Programs > Programs & Features. I believe I had uninstalled it a long time ago.
To counteract this, I did as some YouTube video said (I lost the link to it) and re-installed Python 3.10.1, checked the "Add to PATH" option, checked to install for all users, and checked on the pip install.
After doing this, I upgraded my pip version to the latest version, uninstalled Flask, and re-installed it.
It was still installed in the Python 3.7 folder.
Next, I decided I will just uninstall PIP.
I ran CMD as an Administrator and typed pip uninstall pip as instructed here.
However, when I did this, it says I'm missing access to the places it wants to modify.
I found that strange, so I checked if I'm actually running it Administrator, and, yes, I am.
I looked at the directories that it wants to modify and gave ADMINISTRATORS ownership of all of them.
Absolutely nothing changed and did it again.
I gave myself ownership of it and did it again.
Absolutely nothing changed.
Then, I decided to run pip uninstall pip again. It says pip is not installed. That's strange.
I typed pip, and the help command for pip shows up.
Then, I (probably stupidly) went to all the directories and files PIP listed that it wants to uninstall, and manually deleted them, then uninstalled Python 3.10.1, and made sure to install PIP from there.
And now we're back at Python 3.7, and pip still isn't installed somehow.
I don't know what's happening. I haven't coded anything in Python for 2 or 3 years, and I want to try again, but this is starting to confuse me. Could anyone help?
Edit: Based on the suggestion of one of the answerers, I tried to manually delete pip. I couldn't find it in %APPDATA%, but pip --version shows me the path.
I tried deleting pip from there, but it says I need permission from ADMINISTRATORS. I am an administrator on my computer -.-
Anyways, I tried to take ownership of the folder, but nothing ever came of that.
Try to locate %APPDATA%\pip\pip by typing it into the file explorer. Pip will be located there, and you should be able to delete it.
I've managed to fix the issue.
I found that if I press this button in the start menu search for Python 3.7, it's possible to uninstall it from there (Control Panel said it uninstalled it when I used that, but it didn't).
I think I had installed Python from the Microsoft Store, which is why I couldn't find it in %APPDATA%.
Once I did that, I tried to uninstall Python 3.10 then re-install it. It kept saying it's installed, but it wouldn't show up in Command Prompt.
I fixed this by installing Python 3.10 from the Microsoft Store instead.
This fixed the problem.
The first time I have installed Python on my machine, it was Spyder with Anaconda.
But, with this version, I wasn't able to install pyodbc.
So, I have install Visual Studio Code and everything works fine
But today, I have tried to update some libraries (like certify or scipy) but each time I use pip install, I update my Anaconda folder and not my WindowsApps folder.
So, when I use PIP, how to update the Windows folder and not Anaconda. And also how to remove Anaconda from my computer. In my Windows Settings, I have no app related to Anaconda (weird)
Check your path, and which pip executable is being executed.
If you run it with the full path to your install in WindowsApps, then it should detect and update that version.
You can check which pip you are using with the command of pip --version.
Press win to open the start menu and search uninstall-a to find the Uninstall-Anaconda3.exe or open the control-panel to uninstall it. Like the official docs recommended.
I tried to install the pyqt5 package für python 3.9 on Mac.
Since it didn't work via pip3 I installed it via Homebrew
% brew install pyqt5
and it seemed to work since the terminal says, if I try
pip3 install pyqt5
the requirements are already satisfied.
Yet, if I start PyCharm to to write and test my program it can't find the libraries etc.
What do I have to do?
I just tried to brew install pyqt5 on my Mac. brew then installed a new Python 3.9 interpreter (this is viewed as a dependency of pyqt5).
I suspect the same has happened on your system: brew has installed a whole new Python interpreter, and now when you type pip3 at the command line, you're finding the version of pip installed by brew, which is telling you that pyqt5 has been installed.
However, each Python installation on your system as its own set of packages. Your new Python interpreter has pyqt5 installed, but your original Python interpreter still doesn't.
I suspect that PyCharm is configured to use your default (original) Python interpreter, which doesn't have pyqt5 installed.
Try executing the following at your command prompt (terminal): which pip3. If you're shown a path /usr/local/Cellar/... then this confirms that when you type pip3 at the command line you're actually referring to the version of pip corresponding to a Python interpreter installed by brew.
OK, so what to do going forward?
Two options:
Work with this new Python installation. Then, you'll need to install all of the packages in your previous version of Python again (e.g. just because you had Numpy installed on your original Python installation doesn't mean you'll have it installed by default for your new Python interpreter). Further, you'll have to configure Pycharm to use this Python installation. I don't know the exact steps for this, but go to the Preferences tab and look for something along the lines of 'Python Interpreter' underneath 'Project Settings'.
Remove the new Python installation, figure out what's up with pip, install your desired package.
I'd go with 2). It can get messy to have multiple different versions of Python on your system, unless they're managed by an environment manager such as conda.
To that end, what went wrong when you first tried to install pyqt5?
I'm using windows 10 and I got rid of python 3.8 and installed 3.7 as the only python version on my system.
When trying to install libraries using pip I now get the error:
Fatal error in launcher: Unable to create process using '"c:\users\user\appdata\local\programs\python\python38-32\python.exe" "C:\Users\User\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe" install pygame_menu': The system cannot find the file specified.
when I checked in the console which -a pip I got:
C:\Users\User>which -a pip
/cygdrive/c/Users/User/AppData/Local/Programs/Python/Python38-32/Scripts/pip
/cygdrive/c/Users/User/AppData/Local/Programs/Python/Python37/Scripts/pip
Now when I look for Python in my variable path it is alright...
Anyways I can't figure out how to change the path of pip so the right one is selected... besides its pretty weird that ive uninstalled python and pip multiple times and it still gets it wrong every time during installation.
Thanks
For me this solution did the job, thanks itsAPK
python -m pip install --upgrade --force-reinstall pip
The cause of this problem was me installing python from Microsoft store and having another version installed from the default installer, when I removed the Microsoft store version it was prompting me with errors.
to fix do this :
check if you still have the python38-32 folder in your local variable list
Delete the "%userprofile%\AppData\Local\Programs\Python\Python38" folder
run pip from command line
if the problem still persists then type "environment variables" in the windows search box
and add "%userprofile%\AppData\Local\Programs\Python\Python37" to your system variable named "Path"
This should completely fix your problem
if not
uninstall all the python files including py launcher
reinstall python # when installing you must select ADD PYTHON to system environment variable
When I was facing the same issue I fixed it by checking the python version pointed to by pip3.x executable. The pip3.10 was pointing to /usr/bin/python9 which was causing problems with package installation.
Just check if your pip3.x is pointing to the correct python version.
vim $HOME/.local/bin/pip3.10
Python version is on the first line (starting with the '#').
I have experiencing a problem when installing pywin32 for python 3.5 to my windows 7 PC. The problem is, installation wizard stating that I have no any python versioned as 3.5 in my registery.
My pywin32 file is downloaded from here => pywin32-220.win-amd64-py3.5.exe.
The thing is, when I run python -V code line, I am able to see that I've python 3.5.2 on my PC.
So I don't understand that is the real problem is. Did I get something wrong in logical way?
Any help will be greatly appreciated.
I strongly suggest you delete everything about python on your computer (do not forget to delete related PATH variables) and install Anaconda. You will be able to create several environments and much more.
You can find it in the link below;
https://www.continuum.io/downloads
Export in regedit HKLM\SOFTWARE\Python\PythonCore\3.5-32 and subkeys Replace in an editor "3.5-32" by "3.5" Import the resulting registry file again (by doubleclicking on it).
use "py -m pip install pypiwin32" instead of "py -m pip install pywin32"/"pip install pywin32".
However, I found that pypiwin32 installs version 219. Pywin32's lates version is 221.