Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0.0 on PyPi fails to install with python 2.7 #77

Closed
kudangun opened this issue Dec 17, 2018 · 14 comments
Closed

v3.0.0 on PyPi fails to install with python 2.7 #77

kudangun opened this issue Dec 17, 2018 · 14 comments

Comments

@kudangun
Copy link

Collecting intervaltree (from pyOCD!=0.13.0->mbed-flasher==0.*,>=0.9.0->mbed-clitest->-r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/7c/1c/20e098774a83f8eb8b9e90781d7570c00339f14acc412c91845f86842519/intervaltree-3.0.0.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-eq9tan/intervaltree/setup.py", line 29, in <module>
        from utils import version
    ImportError: No module named utils
@kpalin
Copy link

kpalin commented Dec 17, 2018

Can confirm this! Workaround is pip install intervaltree==2.1.0

@0xc0170
Copy link

0xc0170 commented Dec 17, 2018

Came here to Github issues to check if this was already reported as our Travis started failing recently (latest version pushed 5h ago, about the same time as our CI started failing).

pypi reports v3.0.0 version is the latest. I can see PR #76 not yet merged, how was this release tested and released? I dont see any tag here for v3.0.0 neither.

It can be reproduced just updating to the latest version via pip install -U, it breaks.

@chaimleib
Copy link
Owner

chaimleib commented Dec 17, 2018

I can't reproduce using pip uninstall intervaltree; pip install intervaltree==3.0.0. I'll try on a different computer.

This version was tested using make test on my local, and with Travis. It was released with ~/Library/Python/3.7/bin/twine upload dist/*. #76 was merged a few hours after release.

@0xc0170
Copy link

0xc0170 commented Dec 17, 2018

pin install -U intervaltree using python 2.7 fails.

pip 18.1

pip install -U intervaltree
Collecting intervaltree
  Using cached https://files.pythonhosted.org/packages/7c/1c/20e098774a83f8eb8b9e90781d7570c00339f14acc412c91845f86842519/intervaltree-3.0.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\markoj01\appdata\local\temp\pip-install-2cuwvg\intervaltree\setup.py", line 29, in <module>
        from utils import version
    ImportError: No module named utils


# Same error also for non cached version, just in case

pip install -U intervaltree --no-cache-dir
pip install intervaltree==2.0.1
Collecting intervaltree==2.0.1
  Downloading https://files.pythonhosted.org/packages/6c/fb/2b0ca30b20f8b7685d591c1b1f3c9fb89dd6173c96db42fc3a008950418f/intervaltree-2.0.1.tar.gz (1.2MB)
    100% |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 1.2MB 1.1MB/s
Installing collected packages: intervaltree
  Running setup.py install for intervaltree ... done
Successfully installed intervaltree-2.0.1

Same was reproduced in our Travis

@0xc0170
Copy link

0xc0170 commented Dec 17, 2018

Adding our Travis log here as well: https://travis-ci.org/ARMmbed/mbed-os/jobs/469068292

@0xc0170
Copy link

0xc0170 commented Dec 17, 2018

Python 3.7 works , tested in the env. The latest version broke python 2.7 support.

I checked travis config here it should be running tests with python 2.7 , not sure how it slipped.

@chaimleib
Copy link
Owner

It looks like the issue is that setup.py tries to import the utils. That is strange, since that import used to work in 2.1.0.

@chaimleib
Copy link
Owner

I'll try a release on testpypi, running make distclean first. That seems to solve certain errors, maybe it will solve this one too.

@RomeoActual
Copy link

2.1.0 setup.py doesn't seem to contain import utils.

import os
import errno
import sys
import subprocess
from warnings import warn
from setuptools import setup
from setuptools.command.test import test as TestCommand

import re

@flit
Copy link

flit commented Dec 17, 2018

The problem seems to be that neither MANIFEST.in or setup.py include the utils package in a source distribution. So when setup.py is run when installing via pip, the utils package is truly missing.

If you add include utils/* to MANIFEST.in the problem should be fixed. Installing in Python 2.7 from an sdist tarball created with the updated manifest works without issue.

What I don't understand is why there isn't a problem under Python 3. (See comment below.)

@kaidokert
Copy link

Broke our stuff as well, on clean python 2.7.14 virtualenv same from utils import version exception.

@flit
Copy link

flit commented Dec 17, 2018

The reason it installs successfully in Python 3 is that pip downloads and installs from a wheel, whereas for Python 2 pip installs from a tarball. You can see the difference by running pip download intervaltree==3.0.0 for each of Python 2 and 3. Interestingly, this is with pip 18.1 and setuptools 40.6.3 (latest of each) in both environments.

@chaimleib
Copy link
Owner

I've released 3.0.1. I hope this fixes it!

@flit
Copy link

flit commented Dec 17, 2018

Looks good to me! 3.0.1 installs successfully in both Python 2 and 3. I think you can close this issue now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants