Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip does not exist or could not be executed within virtualenv

When trying to use pip to install flask within a virtual environment, I get the following error:

>(venv)username@Username-MacBook-Air ~/G/L/flaskTest> pip install Flask
>Failed to execute process '/Users/User/Google Drive/flaskTest/venv/bin/pip'. Reason:
>The file '/Users/username/Google Drive/flaskTest/venv/bin/pip' does not exist or could not         be executed.

Is there any reason why this is happening?

like image 993
edenzik Avatar asked Feb 13 '23 00:02

edenzik


1 Answers

Just had the same problem, which led me here. I had just created a new virtual environment and got that error. Like you, I had an ancestor directory with a space in it. After renaming the directory to eliminate the space, everything worked fine. (Someday I'll track down the bug!) Try changing "Google Drive" to "google_drive" or "GoogleDrive", etc.

like image 79
Tyler Perkins Avatar answered Feb 16 '23 02:02

Tyler Perkins