【7.4】python3 raise ImportError(This package should not be accessible on Python 3)

当电脑上安装了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
药企,独角兽,苏州。团队长期招人,感兴趣的都可以发邮件聊聊:tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn