1

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

When I run 'sudo pip install LinkChecker' It threw me error to install couple dependencies which I did. However I'm stuck here now

     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

I'm following this tutorial:

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

I've also installed altgraph but still throws me this error.

Biplov
  • 1,136
  • 1
  • 20
  • 44
  • You may want to consider using `virtualenv`. It will simplify things. – cwallenpoole Nov 29 '16 at 20:55
  • Bit lost. How would that solve the installation issue? – Biplov Nov 29 '16 at 20:55
  • It's my experience that when using a virtualenv (and thereby avoiding needs to call sudo) you have a clearer understanding of what modules, if any, were installed. One of the errors you have above is because of a permissions error related to root vs. your own. This is less likely with virtualenv. – cwallenpoole Nov 29 '16 at 20:58
  • @cwallenpoole Ah, makes sense. – Biplov Nov 29 '16 at 20:58
  • You are right. It worked smooth under virtualenv. Thanks! – Biplov Nov 29 '16 at 20:59

0 Answers0