When I've been opening VS Code lately I've been getting this message saying
The "python3" command requires the command line developer tools. Would you like to install the tools now?
Everytime I click yes and the installer prompts me that it can't be found on the server. Not sure what's going on here. I tried looking at other posts but didn't really see a similar issue. Maybe I missed something.
I'm running the latest version of Python 3 when I check it in the terminal.
On MacOS Catalina 10.15.7 (19H2).
According to your description and feedback, the cause of this problem is that the installation tool pip cannot be used. You can use the following methods to solve it:
You can reinstall pip manually. Install pip.
Usually, python comes with pip, you can also download python again. Install Python.
You can also use the conda command to install what you need when Anaconda is installed. Use conda.
Related
I'm trying to install a python package (specifically pandas) into Visual Studio code on a chromebook's linux virtual machine. I've tried many different things but none of them seem to work: trying to use pip install pandas results in bash: pip: command not found. I have no idea where the actual python interpreter is located, so I can't go to the source. I thought it was that I wasn't using the correct terminal, but the only other option is JavaScript Debug Terminal. What am I doing wrong? Is it even possible?
Pip is a python package management tool, which provides the functions of finding, downloading, installing and uninstalling Python packages. However, this tool is not included in the system and needs to be installed manually. Here is the official website of PIP, which contains installation instructions.
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.
I've coded a game in Pygame using Pycharm, and I want to make it into a downloadable desktop application so that other people can download and use it even if they do not have python or the necessary files. The problem is I don't know how to. I've heard of py2exe and py2app before. I tried py2exe but then realized that .exe was for windows, and I was using a Mac. I read the py2app documentation, but it was very confusing and hard to understand, and none of the things they said worked. They said to use the pip command to install py2app inside the terminal, but I tried it and it said that it did not recognize the pip command. Can someone please help? Thanks!
Sorry if this question is long. I am trying to tell as much information as possible.
You can use pyinstaller if you package the application in Mac OS it will run on Mac.
Click here for instruction on how to install the package and use it.
Which installation of Python do you use? I had bad experience with Homebrew when it came to packaging, then I've removed it and switched to Python3.9 downloaded directly from python.org and everything works well now.
Depending on your Python installation, it is possible that you don't have pip installed on your computer. Via terminal, you can check it using
python -m pip --version
and you should get a response of this type:
pip X.Y.Z from .../site-packages/pip (python X.Y)
If you don't have pip, you can either re-install Python as mentioned above, or you can just install pip using these instructions.
As soon as you have pip installed, you can install py2app using
pip install py2app
I am building a recommendation engine and am not able to install surprise, i thought the problem was because i didn't have a c compiler(since i found some people saying it would solve the problem) so i installed it too but couldn't solve anything. i even tried runing the pip install on my command prompt and it gave an error.
Some users have suggested that i use '!' before pip but pip install works fine for me all the time as u see in the picture for numpy.
the solution i found for this was
Step 1 : Go to anaconda command prompt
Step 2 : Type conda install -c conda-forge scikit-surprise
i hope this is helpful to anyone who encounters this error in the future.
I found the solution, change your enviroment interpreter to python <= 3.7 version
scikit-surprise it´s not support for greater version of python.
For more information see also https://pypi.org/project/scikit-surprise/
I found the solution for me as to first update all my conda packages and then install scikit-surprise. You can follow the steps as well if it works out for you:
Go to anaconda command prompt
Type conda update --all
Type conda install -c conda-forge scikit-surprise
Also I'm running python 3.8.8.
The key error is in Microsoft Visual C++ 14.0 or greater is required. You have to download supporting build tools for C++(sometimes just downloading it from MS website wont work), if you are using visual studio 2022 for python development, you have to modify your installer and download missing build tools, I think its titled "Desktop Development with C++ (not just python developer/IDE) and check almost all tools", however it consumes bit of system space, however it sorted this problem of installing many packages in python which was not working otherwise.
I was able to install it on python 3.7 after installing python3.7-dev
I found the solution in this link https://github.com/NicolasHug/Surprise/issues/283#issuecomment-515878185
Try this in shell: pip install scikit-surprise==1.0.4
I have installed Python 2.7 on Mac and installed pip (with the eventual goal of installing python-swiftclient: https://www.swiftstack.com/docs/integration/python-swiftclient.html )
Unfortunately I get the error "command not found" on using pip.
I have followed the instructions in this thread: pip: command not found I added export PATH=${PATH}:/Library/Python/2.7/site-packages (I verified that this is the correct path) to .bash_profile and ran the source command.
Pip is still not being found.
Anyone know a solution? (Keep in mind this is my first foray into installing python and doing command line stuff. I'm not a born unix user so installing packages and such is pretty new to me...)
Thanks!
When I use python on Mac, I simply install Anaconda, which is shipped with pip. So maybe you could use that.
Anaconda
Try using python -m pip until you get this resolved (or forever if you want :P)