There is no activate when I am trying to run my virtual env

China☆狼群 提交于 2020-01-01 04:19:32

问题


1) I installed virtualenv using pip.
2) I ran the command virtualenv venv
3) Then I ran source venv/bin/activate but it says that there is no such file or directory.

When I cd into venv/bin I find 3 things - python, python 2.7, and python 3.5. Does anyone know the problem?


回答1:


i have had the same problem. and what i did is just run the command virtualenv env again. And then more files were generated under directory env/bin, including the activate file. it's so weird. maybe you can have more try.




回答2:


I solved a similar problem by naming it venv2 when I ran virtualenv. I already had a virtual environment named venv for another project. This allowed me to proceed.




回答3:


I double it is caused by some networking issue, I run it twice to get 'activate' script installed. Maybe first it can't connect to some source so it just abort installation.




回答4:


I experienced this problem when using the --upgrade option. Removed the option, and all ran as expected.




回答5:


I solved the similar problem running python3.7 -m venv venv, you can change for your version of python that is installed in your enviroment.



来源:https://stackoverflow.com/questions/41687841/there-is-no-activate-when-i-am-trying-to-run-my-virtual-env

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!