1

from altgraph.compat import * ImportError: No module named compat

当我运行'sudo pip install LinkChecker'时,安装我所做的几个依赖项给我带来了错误。但是我现在被困在这里

     The directory '/Users/Ben/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Ben/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting LinkChecker
  Downloading LinkChecker-9.3.tar.gz (719kB)
    100% |████████████████████████████████| 727kB 606kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-DKFXDg/LinkChecker/setup.py", line 976, in <module>
        setup(**args)
      File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/tmp/pip-build-DKFXDg/LinkChecker/setup.py", line 460, in __init__
        super(MyDistribution, self).__init__(attrs)
      File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 318, in __init__
        _Distribution.__init__(self, attrs)
      File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 375, in finalize_options
        ep.load()(self, ep.name, value)
      File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2249, in load
        return self.resolve()
      File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2255, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/Library/Python/2.7/site-packages/py2app/build_app.py", line 31, in <module>
        from altgraph.compat import *
    ImportError: No module named compat

我正在关注本教程:

https://github.com/wummel/linkchecker/blob/master/doc/install.txt

我也安装了 altgraph 但仍然给我这个错误。

4

0 回答 0