pip install unsuccessful under python2.7 and python3.7 in virtualenvironment

#2 · closed · 4 comments

View on GitHub ↗

clancygreen

Under python2.7: ```bash virtualenv test2env source test2env/bin/activate pip install git+git://github.com/ResidentMario/gtfs-tripify.git@master python -c "import gtfs_tripify" ``` This produces ``` Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named gtfs_tripify ``` Similarly under python3.7: ```bash /usr/local/bin/python3 -m venv test-env source test-env/bin/activate pip install git+git://github.com/ResidentMario/gtfs-tripify.git@master python -c "import gtfs_tripify" ``` This produces an identical error. The installation is creating only an egg-info directory in site-packages, not a gtfs_tripify source directory. I'm a novice when it comes to python packaging, so it's probably my mistake or could be an easy fix.

Comments

ResidentMario

While I figure this out you can work around this by doing an install from a hard clone: ``` git clone https://github.com/ResidentMario/gtfs-tripify.git cd gtfs-tripify pip install . ```

clancygreen

Thanks that's super helpful. For what it's worth I got the same error installing from a hard clone, but am able to install in editable mode no problem: ```bash git clone https://github.com/ResidentMario/gtfs-tripify.git cd gtfs-tripify pip install -e . ```

ResidentMario

Really? I've only ever installed it in editable mode so I _guess_ I never checked that a normal install works, but this is super weird.

ResidentMario

I was running an old version of `pip` (0.9). Upgrading `pip` (via `pip install --upgrade pip`) to a more recent version (0.18 at time of writing) resolved this issue. So I recommend upgrading your `pip` version and seeing if that resolves the issue.