[Answered ]-Requirements.txt bad interpreter: No such file or directory

2πŸ‘

βœ…

Edit the first line of /Users/byrd/Desktop/Github Repositories/herokusite/venv/bin/pip file to correct the path to python. You can obtain this path by calling which python. I think it should be:

#!/Users/byrd/Desktop/Github\ Repositories/herokusite/venv/bin/python

EDIT: Seems like it is a known bug in unixes – you can’t use spaces in shebang line.

Also try this workaround, it may help you.

πŸ‘€catavaran

0πŸ‘

Do not use spaces in any component of the path where your virtual environment is stored.

It causes problems for the bootstrapping process.

Create a new blank environment, in a directory that has no spaces in its path:

$ cd  # this takes you to your home directory, in OSX its is /Users/yourlogin
$ cd Desktop
$ virtualenv myvenv
$ source myvenv/bin/activate
(myvenv) $ pip install -r /path/to/requirements.txt
πŸ‘€Burhan Khalid

0πŸ‘

first, execute which pip after activating the environment if you found a space between any of the folders like
as seen in this link

you must have noticed a space between the folder name

2nd july

next, delete the new virualenv (in my case envname) and rename the folder with space between its name

then create a new virual environment and then install the requirements through

pip install -r requirements.txt

on the folder location with the requirements file

πŸ‘€Avin Mathew

Leave a comment