Aar*_*ung 12 virtualenv virtual-environment
1)我使用pip安装了virtualenv.
2)我运行命令virtualenv venv
3)然后我跑了,source venv/bin/activate但它说没有这样的文件或目录.
当我cd进入venv/bin我发现3件事 - python,python 2.7和python 3.5.有谁知道这个问题?
小智 13
我曾经也有过一样的问题.而我所做的只是virtualenv env
再次运行命令
.然后在目录env/bin下生成更多文件,包括激活文件.这太奇怪了.也许你可以尝试更多.
Wha*_*kGO 11
根据Python doc,安装步骤是
$ python3 -m pip install --user virtualenv
$ python3 -m venv env
Run Code Online (Sandbox Code Playgroud)
最后一条命令给出警告消息,
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Run Code Online (Sandbox Code Playgroud)
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Run Code Online (Sandbox Code Playgroud)
现在,activate可用。
| 归档时间: |
|
| 查看次数: |
11294 次 |
| 最近记录: |