ukhsa-collaboration / snapperdb

GNU General Public License v3.0
21 stars 5 forks source link

install from pip not working? #18

Closed flashton2003 closed 5 years ago

flashton2003 commented 6 years ago

Hi, working my way through the install options. Pip doesn't seem to work either:

$ pip install snapperdb
Collecting snapperdb
  Using cached https://files.pythonhosted.org/packages/27/d0/94fb40a5a0ac2da1153249221845f4c9b7db7b5aa8ed536ea47d49c33309/snapperdb-1.0.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-FRkBgT/snapperdb/setup.py", line 7, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-FRkBgT/snapperdb/

I tried to fix according to this https://github.com/jazzband/pip-tools/issues/656 but it didn't work, same error.

Apparently downgrading to pip v9 (from v18) might fix https://github.com/jasperproject/jasper-client/issues/680 but I don't really want to do that.

russellsmithies commented 6 years ago

I have the same issue with pip v18.0 My workaround is to use setuptools instead of pip.req. This is what I do to get it to install: git clone https://github.com/phe-bioinformatics/snapperdb.git Edit setup.py and change the start of the file:

from setuptools import setup import os import sys

import pip #from pip.req import parse_requirements try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: # for pip <= 9.0.3 from pip.req import parse_requirements

then install with: pip2 install --upgrade --force-reinstall -e snapperdb

I have the same issue with PHEnix - but the same solution of using setuptools fixes that as well :-)

timdallman commented 5 years ago

This is now resolved