[英]module 'enum' has no attribute 'IntFlag' when creating virtualenv using python3.6?
I'm runing 我在跑步
$ virtualenv -p `which python3.6` env_pcl
#Running virtualenv with interpreter /usr/bin/python3.6
to create an virtualenv by python3.6
用
python3.6
创建一个virtualenv
but an error appeared like below: 但出现如下错误:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 8, in <module>
import base64
File "/usr/lib64/python3.6/base64.py", line 9, in <module>
import re
File "/usr/lib64/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
How can I do to avoid it ? 我该如何避免呢?
Your question is probably a duplicate of Using Python 3 in virtualenv 您的问题可能与在virtualenv中使用Python 3重复
However, do you need to use the third party virtualenv
? 但是,您需要使用第三方
virtualenv
吗?
In recent python 3 versions there is a standard venv module. 在最近的python 3版本中,有一个标准的venv模块。 It is the recommended way to create virtual environments since version 3.5.
从3.5版开始,这是创建虚拟环境的推荐方法。
python3 -m venv /path/to/new/virtual/environment
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.