Forums

Cannot create virtualenv - virtualenvwrapper broken after folder deletion

Hello PythonAnywhere Support Team,

I am writing to request urgent assistance with my virtual environment setup.

I was attempting to troubleshoot a package installation issue and, following some advice, I tried to clean up my disk space. In this process, I manually deleted my myvenv folder using standard Linux commands (e.g., rm -rf ~/myvenv) instead of the correct rmvirtualenv command.

Since then, my virtualenvwrapper configuration has become corrupted, and I can no longer create any virtual environments.

Errors Encountered:

When I try to use

mkvirtualenv myvenv --python=python3.10
ERROR: virtualenvwrapper could not find virtualenv in your path

When I try to reload the setup script, the root cause is revealed: Bash

$ source /usr/local/bin/virtualenvwrapper.sh
bash: /home/ChocoPi/.local/bin/python: No such file or directory
virtualenvwrapper.sh: There was a problem running the initialization hooks.

It appears that the path /home/ChocoPi/.local/bin/python is since that path does not exist, the initialization fails.

Could you please access my account's shell configuration and manually reset or fix the virtualenvwrapper environment variables so I can create virtual environments again?

Thank you very much for your help.

Start a new console. It should rebuild your .local