python - Error when starting ipython notebook when into virtual environment -


when type ipython notebook works fine. need work virtual environment:

what do

virtualenv .env source .env/bin/activate pip install -r requirements.txt 

now type

ipython notebook 

this given error:

/home/derk/assignment2/.env/bin/python: bad interpreter: no such file or directory 

so when not in virtual environment can start notebook. however, when not virtual environment gives error.

the requirements.txt looks this:

cython==0.21.2 jinja2==2.7.3 markupsafe==0.23 pillow==2.7.0 backports.ssl-match-hostname==3.4.0.2 certifi==14.05.14 gnureadline==6.3.3 ipython==2.3.1 matplotlib==1.4.2 mock==1.0.1 nose==1.3.4 numpy==1.9.1 pyparsing==2.0.3 python-dateutil==2.4.0 pytz==2014.10 pyzmq==14.4.1 scipy==0.14.1 six==1.9.0 tornado==4.0.2 wsgiref==0.1.2 

everything worked correctly before, (maybe after software updates) doesnot. tried reinstalling anaconda (as suggested on sites), without success. problem here?

this error can happen when 1 has moved or renamed virtualenv. in case, folder moved user(mint -> emil), otherwise had same path. solve 1 can edit configuration files, see answer. in case, python worked fine within virtualenv, ipython did not:

(env) emil@emil-virtualbox ~/x/x $ ipython bash: /home/emil/x/env/bin/ipython: /home/mint/x/env/bin/python3.5: bad interpreter: no such file or directory 

checking file run:

(env) emil@emil-virtualbox ~/x/env/bin $ ipython /home/emil/x/env/bin/ipython 

did not indicate problem. browsed folder , file there. wasn't missing. remembered had had edit files after moving virtualenv earlier. 1 has edit 'bash header' (sha-bang) in important files. in case, these were:

activate pip ipython 

i.e., find header looks like:

#!/home/mint/x/env/bin/python3.5 

and change to:

#!/home/emil/x/env/bin/python3.5 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

http - Safari render HTML as received -