Problem with installing Python in external drive - python

I am a beginner in Python and PyCharm. I had installed both Python and PyCharm in my D drive, instead of C. But then, I was facing some issues, so had to uninstall and reinstall them in my C drive. Now, when I use the pip command in CMD, it says
Fatal error in launcher: Unable to create process using '"D:\Program Files\Python\python.exe" "C:\Users\USERNAME\AppData\Local\Programs\Python\Python39\Scripts\pip.exe" ': The system cannot find the file specified.
I tried looking for solutions but have given up. Does anyone have any suggestions?

This is because your path file is still leading to the pip in D: Go to path and change that to your C: directory for pip

Try to install via Python website it could fix your terminal issues.
In PyCharm settings you can change your Python environnement (tutorial here).

I also had the same problem and I tried the following steps:
Open CMD as an administrator.
Write 'python -m pip install -U --force pip' in the CMD.
Restart your PC/laptop.
Try the pip command now.

Related

Have problem to run Python command installed by pip in macOS Terminal

I'm not a Python user, so know little about Python. But I have to install stcgal using pip3 following its official guide.
pip3 install stcgal
However, if I run the installed command in terminal, it says zsh: command not found.
After a long searching, I find it was installed at /Users/myUserName/Library/Python/3.8/bin/. Though I can run the command with that path, it's very inconvenient. I wonder is there any way to run the code in any directory instead having to locate it explicitly?
Try something like this:
python -m stcgal -h
You can create or edit your /Users/yimingliu/.zshrc file (if your macOS is older than macOS Catalina 10.15, then the file is /Users/yimingliu/.bash_profile), and add a line to add the python bin folder to your path:
export PATH=/Users/yimingliu/Library/Python/3.8/bin:$PATH

python -- manually install downloaded module without admin rights

I am trying to install the python package us without admin privileges.
I have tried pip install us in Anaconda prompt to no avail.
I have also tried the suggestion listed here: Install python modules on windows without admin rights--didn't work.
I have now downloaded the files from the site https://pypi.org/project/us/ to my desktop and need to know how to install the package from here.
I am using the Spyder IDE and Python 3.7. Is there a way to do this?
Thanks.
I do this on the daily and if I understand what you are saying you are doing it right. If pip install us in command prompt or shell (if you are using Windows OS) doesn't work try py -m pip install us. Make sure you are using command prompt and not using your IDEz
As you can see it worked first try for me.
Since you have downloaded the files, Extract them in a folder and normally a setup.py file must be include, open command prompt in that folder and run :
python setup.py install

Python Pip "Fatal Error in Launcher" and other issues with updating pip

I'm trying to install Pyinstaller to my computer using pip to convert a python file into a .exe file. When I try to install it, Command Prompt gives me the following error :
Fatal error in launcher: Unable to create process using
'"c:\python27\python.exe" "C:\Python27\Scripts\pip.exe" install
pyinstaller': The system cannot find the file specified.
I've done some looking online and tried just about everything I've found this far and I'm at a loss. I have tried:
using python - m pip install xxxx
updating pip
reverting back to a previous version of pip
using Command Prompt as an Admin
making sure pip is in my PATH using environmental variables
uninstalling and doing a complete reinstall of python.
Reading other people's questions related to this problem, several people suggested running different lines of code like python -c "import pip.__main__" and python -m pip install pip==9.0.0 and my Command Prompt doesn't do anything, even while running as an admin. I assume that I have something fucked up deep in my files or settings that I didn't even realize I changed, but I can't see it for the life of me. I'd be happy to try any suggestions anyone has. Thanks!
Edit: It seems like there may be something wrong with my Command Prompt? When I try entering python -m venv venv, it doesn't do anything or acknowledge the command.

Unable to do pip install pandas-profiling

I've tried severally to install Pandas-Profiling on my windows 10 cmd using "pip install pandas-profiling" but it doesn't work. I've also tried installing it on conda but its the same story. I need help installing this please.
I also had the same problem. It didn't work with a normal pip install. I fixed it by running the following command in anaconda prompt:
conda install -c anaconda pandas-profiling
You can find the full documentation here.
Hope it helps :)
if you don't provide the error message, we can't help you.
If you have the following error message:
'pip' is not recognized as an internal or external command,
operable program or batch file.
It means that Python is not added to your Path environment variable. How to fix it:
First solution: Adding Python to the Path by going in your environment variables, in System Variables click on Path then Edit, and in the grid, add your Python's path (which may be C:\Users\<user>\AppData\Local\Programs\Python\Python<version>\). You can also add Python yo the Path by uninstall it and install it again and in the installer, make sure you check "Add Python to PATH"
Second solution: You can run pip by putting python3 -m before you pip command, like that: python3 -m pip install pandas-profiling.
I have been able to find a solution to the error message. I had to install the Microsoft C++ Build Tools, then I launched it and did the installation through it using ‘pip install pandas-profiling’ you can download using the link https://visualstudio.microsoft.com/visual-cpp-build-tools/
For me it only works also if putting "py"
so:
py -m pip install pandas-profiling
In the command prompt.

How to install packages with pip in Windows PowerShell

I am using Python 2.7.9 on a Windows 8 computer.
I tried to install lxml by typing pip install lxmlin Windows PowerShell after typing python, but I get the following error: SyntaxError: invalid syntax
I tried installing pip by using the following tutorial http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/ only to later realize that I already had pip.exe, pip2.7.exe and pip2.exe installed when I first installed Python. They are located in the C:\Python27\Scripts directory.
Yet, if I try something like pip help I will get an invalid syntax error.
Do I have to reinstall pip or how do I get it to work in order to install the lxml library.
Thank you for any help you can provide.
I had the same problem. You need to set the PATH environment variable, so that the system recognizes the command "pip".
If typing easy_install or pip [in PowerShell] doesn’t work, it means the Scripts folder is not in your path. Run the next command in that case (Note that this command must be run only once or your PATH will get longer and longer). Make sure to replace c:\Python33\Scripts with the correct location of your Python installation:
setx PATH "%PATH%;C:\Python33\Scripts"
Close and reopen PowerShell after running this command.
Source: http://arunrocks.com/guide-to-install-python-or-pip-on-windows/
Starting from Python versions 2.7.9 and 3.4.0, 'pip' is already included in the regular install. Check if the path to the 'Scripts' directory inside your Python installation directory is contained in your system's 'PATH' environment variable, so 'pip' can be found.
Look here for more information:
How do I install pip on Windows?
Edit: Sounds like you are trying to run pip inside python, You shouldn't get an 'invalid syntax' error through the command prompt. More like "'pip' is not recognized". Try simply just opening command prompt and typing 'pip help'

Categories

Resources