-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
check-dependencies.py failing for pytz on Ubuntu #1081
Comments
I followed the instructions as updated in #1080 and couldn't replicate this behavior. |
@brutasse This was actually via source installation. Steps to reproduce on Ubuntu 14.10:
|
Reproduced on Ubuntu 14.04. |
Recreated on an Ubuntu 14.10 Rackspace Cloud VPS:
All output of my pip/python commands are in this gist: https://gist.github.com/bitprophet/794bb907dfa30460b08e I'm wondering if perhaps this has something to do with individual packages' sensitivity to the local I also noticed that some of the Should also try to reproduce on a non Ubuntu platform to see if it's related to Ubuntu/Debian specific Python shenanigans, as I've run into that before. I have a CentOS 6.5 instance cooking now. |
@bitprophet Looks lik you're onto something. Tested with CentOS 7, unable to reproduce.
|
Also unable to reproduce on Debian 7.7. This appears to be an Ubuntu-ism. |
Yea I remember having wackadoodle Python issues on Ubuntu back when I opsed on it (which is now a few years ago). Quickly peeped some setup.py files and both 'good' and 'bad' packages do things like require setuptools, so I'm largely out of ideas here and would probably just be Googling terms related to ubuntu, python and prefixes until something rang a bell Comedy option: have the checker test for this specific case, either VERY specific ("if ubuntu -> look in |
This is probably a stab in the dark, but perhaps @warsaw might have some insight into what's causing this issue. |
Unable to reproduce in Ubuntu 13.10. Whatever is causing this appears to have surfaced in Ubuntu 14.04. |
Just a quick note until I get a chance to try to reproduce this. The Debian wiki briefly describes why dist-packages instead of site-packages on Debuntu systems: "dist-packages instead of site-packages. Third party Python software installed from Debian packages goes into dist-packages, not site-packages. This is to reduce conflict between the system Python, and any from-source Python build you might install manually." https://wiki.debian.org/Python It's completely expected that apt-get installed third party packages end up in /usr/lib/pythonX.Y/dist-packages and manually installed packages end up in /usr/local/lib/pythonX.Y/dist-packages. AFAIK, none of the standard Debuntu Python tools touch /opt. |
It's not at all surprising that carbon ends up installing in /opt, since the setup.cfg is explicitly telling it to do that. Having [install]prefix point to /opt/graphite and having install-lib variable are exactly equivalent to calling "python setup.py install --prefix=/opt/graphite --install-lib=/opt/graphite/lib" Note that if you enable setuptools by doing "USE_SETUPTOOLS=1 python setup.py install" on Ubuntu 15.04 you'll get a nice warning from setuptools. stdlib distutils doesn't include this warning. I tested the recipe above in Ubuntu 15.05 and Debian sid (unstable). Same behavior in both (i.e. installs to /opt/graphite). Seems like everything's working as intended (where "intended" means "what the setup.cfg" is saying to do). :) |
@warsaw Thanks for the feedback. The problem isn't that Carbon is being installed to |
Right, sorry I missed that. I still think it's the setup.cfg that's messing you up. If I comment out the [install] section in carbon's setup.cfg, the Sid's version of pip is 1.5.6 so my guess is that it applies setup.cfg to all requirements installed via -r. Or IOW, I think it's pip's problem. :) |
That doesn't make sense… When you @obfuscurity what's the pip version on the debian 7.7 you tried? |
|
I wonder if this is related to Wheels. If I remember correctly Ubuntu 14.04 has pip 1.5.x which will install Wheels by default and if I look at pytz on PyPI it has a wheel file. Does it still install into different locations if you do |
@dstufft Well that's interesting. Again, in Debian sid (which has pip 1.5.6), adding --no-use-wheel seems to avoid installing into /opt. Do you know why that would be? |
My guess is this code https://github.com/pypa/pip/blob/develop/pip/locations.py#L211-L259 in particular the use of the Distutils command is probably checking the current directory for |
Adding |
Yeah, it looks like every distro with a pip that includes Wheels also works well with Would it be reasonable to check for the specific version of pip that started using Wheels and base our logic around that? |
Nope, just put the pip version in the requirements and I believe it will do the right thing. For several internal webapps at $real_job we deploy via wheels and have to do this. |
File a pip bug please.
|
@SEJeff Can you give an example how this would work? |
So, what's preffered fix? pinnin pip to <= 1.4.x (not sure how it will work when we have system pip version >= 1.5) or just documenting "--no-use-wheel" (IMO better for now) ? |
+1 for documenting |
I agree with @brutasse here |
@obfuscurity you can remove the check for pytz, because pytz is shipped with graphite itself in https://github.com/graphite-project/graphite-web/tree/0.9.x/webapp/graphite/thirdparty |
Fixed in #1233 |
A handful of requirements are being installed in
/opt/graphite/lib/python2.7/site-packages
rather than the default system location, when usingpip install -r requirements.txt
.This is causing
check-dependencies.py
to fail for pytz unlessPYTHONPATH
is set to include the site-packages directory.I'm not sure what the correct fix is here. I hate to just remove pytz from
check-dependencies.py
but I don't have any better workarounds. FWIW, none of the other packages listed above are incheck-dependencies.py
or they'd fail the same way.The text was updated successfully, but these errors were encountered: