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

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 ?

1 Answers

1
VPfB On Best Solutions

Your question is probably a duplicate of Using Python 3 in virtualenv

However, do you need to use the third party virtualenv?

In recent python 3 versions there is a standard venv module. It is the recommended way to create virtual environments since version 3.5.

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