简体   繁体   English

我如何用python解决我的virtualenv问题?

[英]How i can fix my virtualenv problem with python?

I was trying to create my first django project so I installed the virtualenv.我试图创建我的第一个 django 项目,所以我安装了 virtualenv。 After I typed this into the terminal:在我在终端中输入以下内容后:

~$ virtualenv --python-python3 firstdjango 

My terminal gave me this error:我的终端给了我这个错误:

Usage: virtualenv [OPTIONS] DEST_DIR  
virtualenv: error: no such option: --python-python3

What should I do?我该怎么办?

Since you're using python 3 you should use:由于您使用的是python 3,因此您应该使用:

python3 -m venv /path/to/new/virtual/environment

as documented here: Creation of virtual environments如此处所述:创建虚拟环境

[FYI: the problem in your original is the that flag takes an = like --python=python3 ] [仅供参考:你原来的问题是那个标志需要一个= like --python=python3 ]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM