ubuntu创建python虚拟环境,在Ubuntu上使用virtualenv为python3设置虚拟环境

I want to learn Django so for that, as per the instructions on the website, you need to create a virtual environment. I've heard enough horror stories about people corrupting their OS cause they didn't set up the virtual environments properly so it's safe to say I'm sufficiently paranoid.

I've created a separate folder/directory VirtualE at located at Academics/CS/VirtualENV and I want to create all my virtual environments there. As per the website, the following command should be used -

virtualenv --python=`which python3` ~/.virtualenvs/djangodev

I'm not sure what exactly I should write in place of the single quotes (the which python3 part). I wrote the following -

virtualenv --python=3.5.2 ~/Academics/CS/VirtualENV/DjangoDev

It says

The path 3.5.2 (from --python=3.5.2) does not exist

Where exactly am I going wrong?

解决方案

In the command line, type "which python3" and it will give you the path to python3. You just need to copy and paste that in the command. For example:

virtualenv --python=/path/to/python3/bin/python ~/Academics/CS/VirtualENV/DjangoDev

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值