python - Flask virtual environment: bad interpreter: No such file or directory -


this question has answer here:

i'm working on little side project , it's first time using flask. i'm working virtual environment , therefore have shebang @ beginning of script, looks this

#!flask/bin/python 

when try execute script command line, following error:

-bash: ./run.py: flask/bin/python^m: bad interpreter: no such file or directory 

i know means python interpreter couldn't found, if navigate flask/bin can see interpreter inside. files inside of flask/bin

activate
activate.csh
activate.fish
activate_this.py
easy_install
easy_install-2.7
pip
pip2
pip2.7
python
python-config
python2 -> python
python2.7 -> python
wheel

i tried delete virtual environment directory , create again, didn't help.

why shebang not work in case?

did write script in windows environment , move on unix environment? because line endings different, files written in 1 environment not automatically work on other. see here more info.

to resolve this, try using dos2unix, or if you're using notepad++ on windows, there options save file in windows format.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -