当电脑上安装了Python2 和 python3时,在python3下执行help()报如下错误:
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3.
Either you are trying to run from the python-future src folder or your installation of python-future is corrupted
这是因为环境变量中包含PYTHONPATH=/usr/local/lib/python2.7/site-packages,而这条不适用于python3。
在shell下执行
unset PYTHONPATH
即可解决
作者:超超超超超超超超级玛丽
链接:https://www.jianshu.com/p/b473db25bdf3
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。