EL CAPITAN更新

时间:2015-12-13 19:46:21

标签: python zlib virtualenvwrapper

在最近的El Capitan更新后,当我打开终端时,我收到以下错误而没有尝试任何操作。

    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
        exec code in run_globals
      File "/usr/local/lib/python2.7/site-packages/virtualenvwrapper/hook_loader.py", line 8, in <module>
        import inspect
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 39, in <module>
        import tokenize
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tokenize.py", line 29, in <module>
        from itertools import chain
    ImportError: No module named itertools
    virtualenvwrapper.sh: There was a problem running the initialization hooks. 

    If Python could not import the module virtualenvwrapper.hook_loader,
    check that virtualenvwrapper has been installed for
    VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python and that PATH is
    set properly.

如果我在命令行中运行python(2.7.9)它可以工作,但是当我尝试导入没有模块zlib错误的zlib时它会失败。

我尝试通过简单安装重新安装pip,所以我可以重新安装virtualenv和virtualenvwrapper,但是当我尝试sudo easy install时,我得到&#34; zipimport.ZipImportError:无法解压缩数据; zlib不可用&#34;。

所以我接着尝试改变.bash_profile,但我真的不知道如何改变它,因为我不了解路径和环境变量。 CURRENT bash_profile内容为:

export PATH=/usr/local/share/python:$PATH
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

我最后的希望是,如果我能指出正确方向的道路,一切都会得到解决。

0 个答案:

没有答案