HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
111 stars 39 forks source link

setup.py chokes on required pkgconfig #56

Closed NLaws closed 6 years ago

NLaws commented 6 years ago

I'm trying to add h5pyd to a project's requirements.txt, however, when pip install -r requirements.txt I get the following:

Obtaining h5pyd from git+http://github.com/HDFGroup/h5pyd.git@v0.3.0#egg=h5pyd (from -r requirements.txt (line 61))
  Updating ./env/src/h5pyd clone (to v0.3.0)
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/pkgconfig/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
    Couldn't find index page for 'pkgconfig' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
    No local packages or working download links found for pkgconfig
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/src/h5pyd/setup.py", line 43, in <module>
        'hsconfigure = h5pyd._apps.hsconfigure:main']
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/setuptools/__init__.py", line 128, in setup
        _install_setup_requires(attrs)
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/setuptools/dist.py", line 455, in fetch_build_eggs
        replace_conflicting=True,
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 866, in resolve
        replace_conflicting=replace_conflicting
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1146, in best_match
        return self.obtain(req, installer)
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1158, in obtain
        return installer(requirement)
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/setuptools/dist.py", line 522, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Users/nlaws/projects/reopt/webtool/reopt_api/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 667, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pkgconfig')

Does the version of pkgconfig need to be specified in setup.py (for the setup_requires arg)? If so, which version?

NLaws commented 6 years ago

Could be related to https://github.com/pypa/setuptools/issues/1320 - the project requires python 2.7.13.

NLaws commented 6 years ago

This appears to be a mac os specific issue with SSL certificates. I was able to solve it by installing python 2.7.15, running the included "Install Certificates.command", and virtualenv -p /usr/local/bin/python env. (The -p /usr/local/bin/python is necessary, as it appears that virtualenv uses the system python by default - which is version 2.7.10 on my mac).

Make sure that python --version is 2.7.15 after install.

Finally, you might have to force pip to upgrade to version 10 if you get a warning about using version 9: curl https://bootstrap.pypa.io/get-pip.py | python