0

I am a python newbie and unable to install scrapy on my mac os 10.10.15. I installed brew and able to setup virtualenv.

(scrapdata) 
----------
$ pip3 install scrapy
Collecting scrapy
  Using cached Scrapy-1.4.0-py2.py3-none-any.whl
Collecting pyOpenSSL (from scrapy)
  Using cached pyOpenSSL-17.2.0-py2.py3-none-any.whl
Collecting Twisted>=13.1.0 (from scrapy)
  Using cached Twisted-17.5.0.tar.bz2
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) -- Some packages may not be found!
    Couldn't find index page for 'incremental' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) -- Some packages may not be found!
    No local packages or working download links found for incremental>=16.10.1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/qt/0m1c18vs4wj_xwmw40m92v7w0000gn/T/pip-build-x9273g0d/Twisted/setup.py", line 21, in <module>
        setuptools.setup(**_setup["getSetupArgs"]())
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/User/UserName/scrapdata/lib/python3.6/site-packages/setuptools/dist.py", line 325, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/Users/UserName/scrapdata/lib/python3.6/site-packages/setuptools/dist.py", line 446, in fetch_build_eggs
        replace_conflicting=True,
      File "/Users/UserName/scrapdata/lib/python3.6/site-packages/pkg_resources/__init__.py", line 855, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/Users/UserName/scrapdata/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1127, in best_match
        return self.obtain(req, installer)
      File "/Users/UserName/scrapdata/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1139, in obtain
        return installer(requirement)
      File "/Users/UserName/scrapdata/lib/python3.6/site-packages/setuptools/dist.py", line 518, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Users/UserName/scrapdata/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/qt/0m1c18vs4wj_xwmw40m92v7w0000gn/T/pip-build-x9273g0d/Twisted/

I have pasted the output. Also tried installing setuptools, unroll and easy_setup but nothing worked. Please help. Thanks!

sum98
  • 1
  • 1
  • 1

1 Answers1

0

Have you tried the following?

  • Deleted and recreate your virtualenv?
  • Use the --no-cache-dir option in pip
  • If that doesn't work, blow away your cache located in ~/Library/Caches/pip and try again?

I just tested using pyenv (highly recommend) and it worked without any issue and I'm on macOS Sierra as well. Good luck!

EDIT #1: As I think about this, you may have some wacky Python/MacOS thing going given the whole SSL string in your error. Take a peek at this SO post as its pretty similar to what you're going through ==> "SSL certificate verify failed" using pip to install packages

Carlos
  • 1,897
  • 3
  • 19
  • 37