Install in a new environment jupyter An error occurred when :AttributeError: module 'enum' has no attribute 'IntFlag'
, Details of the error are as follows
==> script messages <== Traceback (most recent call last): File
"/home/path/to/miniconda2/envs/py3/bin/jupyter-nbextension", line 4, in
<module> import re File
"/home/path/to/miniconda2/envs/py3/lib/python3.7/re.py", line 143, in <module>
class RegexFlag(enum.IntFlag): AttributeError: module 'enum' has no attribute
'IntFlag'
In the same way , direct import re
The same error can occur , Query discovery , yes PYTHONPATH Setting error for , stay .bashrc It is reserved for previous use python2 Configuration left by , cause python3 Can't find the right one enum position , Comment out bashrc After the related statements in , empty $PYTHONPATH Variable :
unset PYTHONPATH # Check to see if it is empty echo $PYTHONPATH
Then it can be used normally ,PYTHONPATH yes python2 Multi purpose configuration in , use python3 and conda After the general no longer needed

Technology
Daily Recommendation
views 214
views 191
views 181