I have installed Python 3.8.1 on my laptop. I wasn't successful in installing pip from the command prompt.
I opened the command prompt, went to were the file get-pip.py is located and ran the command python get-pip.py and nothing happened.
I then went to advanced systems settings/system properties/environment variables and edited the Path, put C:\Python38\scripts. I then tried again to run the command python get-pip.py but nothing happened
I'd appreciate any assistance, thanks
Please be careful that you are actually wanting to run a specific file, hence, the directory that you are in also needs to be the right one. You can not just run the files randomly by opening cmd. First head on where your "get-pip.py" file is, then try to run the command again, and let us know the result.
Related
please I need your help here!
My system crashes each time i run a python command in terminal. When i run something like python app.py, my Mac will crash and bounce, and reset.
In Terminal,
When i run python -V, it returns Python 3.7.6,
When i run python3 -V, it returns Python 3.8.5
When i run which python, it returns /opt/miniconda3/bin/python.
A moment ago, i was trying to build a standalone app, and turned on virtualenv. However no matter how hard i tried, i failed. Then i deleted the virtualenv folder in the app folder.
Perhaps during the development processes, in Visual Studio Code, i accidentally "linked" the virtualenv with the python interpreter 3.7 (/opt/miniconda3/bin/python), which was set as the default python system long ago (i can't even recall when and how). After the virtualenv folder deletion, i remember the interpreter had the word "cached" in the front of the python version. Somehow i turned on and off this and that, and restarted the app, i have get rid of the word "cached". But the system still crashes .
My Mac crashes now every time i run a python command in Terminal. Please help!
i even have tried update conda update conda, it says no such directory,
ofcoruse i then tried update miniconda, same answer.
You should remove it from your path.
To do so, check for the miniconda3 entry in the file named ~/.bashrc, ~/.bash_profile, and /etc/profile file and comment out the line:
export PATH=/opt/miniconda3/bin:$PATH
by preceding it with the # character.
I am using an anaconda environment in VS code when suddenly the Run Python File in Terminal command bound to the green play-button in the top right corner stopped working. It used to input: python_path file_path/file.py into the terminal and it worked perfectly fine.
But after running my code in the anaconda prompt program it has now changed to:
& conda run -n env_name python file_path/file.py and now I get a ModuleNotFoundError, that I don't have cv2 installed, which I do.
I can still run the code if I simply input: python file_path/file.py. My question is if it is possible to change the command that is bound to Run Python File in Terminal. I could not find a solution to this in a couple hours of searching. Thanks in advance.
One solution I found was to reinstall the older python plugin and the "conda run -n" command would not be used at runtime.
Reinstallation method, Extension --> Python--manage--> install another version
You're most likely running into a bug in conda 4.8. You can either downgrade the extension until a point release comes out with a fix or simply wait for a fix (hopefully Monday).
My linux distribution(Opensuse 42.2) comes with python 2.7 already installed, however I installed python3 on top of that. And in order to launch IDLE to run the python3 shell, I was told to install "python3-tools" and then just run "idle3" in terminal to launch the shell. However running "idle3" in terminal only brings up an error message, and I can't find any other suggestions. Any help would be extremely appreciated.
** I have fixed the problem. The sources that I found gave me the improper package name. After searching the main-repository for Opensuse, the proper package name for python3 IDLE was "python3-idle".
I'm pretty new to the community, and new to python. I know the basics. But now I'm trying to download third party modules via pip but everything I do regarding pip displays an error. I know that pip comes with python seeing as the pip file is there.
I am running python 3.6 and windows 10. I have downloaded pip off the internet also but when I try to run the program it says already downloaded. The first time I ran it it said that it was downloading and successfully downloaded so I'm kind of lost.
Thanks!
Sounds like it's already properly installed. pip is a program called from a system terminal, not from a Python prompt. Open up a command prompt and type pip -h see what happens. If this does not print out the help page on how to use pip, and instead you get an error to the effect of:
"pip" is not recognized as an internal or external command, operable program or batch file
You then need to point Windows where to find the program (pip.exe) by adding your Python scripts folder C:\...\Python36-32\Scripts\ to your environment PATH variable. To do this, open the Start menu and search for "environment variables". Open the dialogue and find one named PATH (case doesn't matter). If it doesn't exist, create it. Edit the value and add the file path to the scripts folder to the end using ; as a separator.
As per your comment, if you are getting an access denied windows error this answer from another question may help you.
You need need to be sure either your powershell is being run as administrator, or by creating a virtual environment.
The Installing Packages docs have a great overview, and instructions.
https://packaging.python.org/installing/#use-pip-for-installing
Ok, so I have been through many of the different fixes, and I still can't get it to work. In python command line I run the
pip install pyinstaller
it gives me a syntax error, so I run the line of code to set my path, and pip is in my scripts, it still doesn't work. I am not sure how to get this to work. pip is installed but it still refuses to install pyinstaller, saying it has a syntax error. Upon looking this up I find you need to set the path, so I do so, but that does not fix the problem, Help would be very nice!
You have to run that command from the command line (the terminal), not the Python interpreter.
You may think if something is written in Python or for Python it must be run from the interpreter. Well, not necessarily. Speaking of pip or easy_install, they must be run from the terminal.