0

I work in Pycharm on a python project. I want to use the terminal within Pycharm (powershell) to install new packages. When I run pip install websockets. I get the following error:

Fatal error in launcher: Unable to create process using '"C:\Users\arnes\cloud_backup\Projects\ocpp\venv\Scripts\python.exe" "C:\Users\arnes\cloud_backup\Projects\ocpp_python\venv \Scripts\pip.exe" install websockets': The system cannot find the specified file.

I changed the name of the project from "ocpp" to "ocpp_python". For some reason the terminal looks for the python.exe in the old folder name "ocpp\venv" instead of "ocpp_python\venv".

I manually adjusted the python interpreter to the correct path "C:\Users\arnes\cloud_backup\Projects\ocpp_python\venv". Running my scrips also works but installing new packages via the terminal is not. How can I adjust the path for the terminal?

Any help is appreciated :)

I want to install packages via the terminal within pycharm for my virtual environment.

1 Answer 1

1

When the venv is created, pip.exe is generated. The .exe file contains the absolute path to the Python interpreter of the venv.

If you rename the venv you have to reinstall pip with

python -m pip install --force pip
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.