PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 4th of August, 2016

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[09:49:52] <muelli> how would I install pip straight from source, say github?
[09:53:52] <muelli> more precisely, I'm trying to package my python app as flatpak. But pip is getting in my way. So I want to install a newer one in that target container. So connecting to the Internet is frowned upon.
[10:11:36] <mgedmin> if you cannot access the internet, how are you going to get the pip source from github?
[10:26:01] <muelli> mgedmin: I get it first.
[10:26:22] <mgedmin> hm; simplest way would be to get a pip wheel from pypi and install that
[10:27:19] <mgedmin> but offhand I cannot think of a reason why that wouldn't work with a source tree as well
[10:31:26] <muelli> I do. but executing get-pip connects to the internet. But I found the tarball on pypi and setup.py install --prefix=/app seems to work :)
[10:38:47] <mgedmin> ah, I'd assumed you'd use the existing (older) pip to upgrade itself
[12:02:37] <muelli> hm. So I need to pip install my app to /app. IOW: I also want to be able to run /app/bin/mypythonapp. So I env PYTHONUSERBASE=/app pip2 install -v --prefix=/app -rrequirements.txt . my application, but when running it, it complains about ImportError: No module named pkg_resources. I'm a bit confused now. Any hints as to how I can make it work?
[12:19:54] <mgedmin> is python itself present in the flatpak runtime?
[12:21:48] <muelli> mgedmin: yes.
[12:22:11] <mgedmin> what about setuptools?
[12:22:44] <mgedmin> if installed, it ought to be in /usr/lib/pythonX.Y/site-packages/setuptools/
[12:22:45] <muelli> mgedmin: ImportError: No module named setuptools. But I (thought I) installed pip.
[12:23:02] <mgedmin> pip doesn't contain setuptools
[12:23:08] <muelli> ah.
[12:23:22] <mgedmin> pip needs setuptools to install from sources, but it can install wheels even when setuptools aren't installed
[12:23:49] <mgedmin> although now I wonder how console_scripts can work if setuptools isn't present ... probably they can't
[12:24:50] <muelli> mgedmin: hm. Is it possible to install setuptools in /app ? I guess I go and try...
[12:26:46] <mgedmin> yeah; I've a feeling you're breaking new ground here
[12:27:21] <mgedmin> (I can't even figure out how to make my pygi gtk+ app work after pip installing it, or how to properly package it for debian)
[12:28:09] <muelli> mgedmin: once you find out, please tell me. It's bothering me for long time now :-/
[12:31:00] <muelli> what's funny is that I see lines like "Installing pip2 script to /app/bin" when installing pip, but I don't see that binary in the resulting flatpak.
[12:32:13] <muelli> also: Installed /app/lib/python2.7/site-packages/setuptools-25.1.4-py2.7.egg but it's not in the image.
[12:32:40] <muelli> at least when I do flatpak run --command=sh org.gnome.MyApp I can't see it.
[16:21:25] <bhahn> hey guys, i’m trying to understand wheels and filesize
[16:21:56] <bhahn> i built a scipy wheel that was around ~30mb, but when installed ends up 100mb+
[16:25:25] <Wooble> bhahn: wheels are ZIP, so sounds like you got nice compression.
[16:25:54] <bhahn> ah
[16:47:31] <ravioli> Hi! On OSX, I tried upgrading pip (sudo pip3 install --upgrade pip), but it threw a few errors (The directory '[...]/Caches/pip' or its parent directory is not owned by the current user and caching wheels have been disabled[...]). Now I can't run pip or pip3 (command not found). Any advice?
[17:06:32] <tos9> ravioli: Never touch the system pip or python.
[17:06:42] <tos9> Typing `sudo python` or `sudo pip` is basically always wrong.
[17:07:12] <tos9> ravioli: I'd recommend you now just ignore that entirely and install Python with homebrew, which will give you a pip associated with that Python.
[17:39:54] <ravioli> tos9: It seems like python3 is installed and working. Will installing python3 from brew interfere with that installation?
[17:40:34] <tos9> ravioli: Nope.
[17:41:01] <tos9> ravioli: I'm not sure where you got your original Python3 from -- OS X doesn't ship with it
[17:41:09] <tos9> But either way, yeah, homebrew won't interfere
[17:41:22] <ravioli> tos9: It's telling me it's already installed.
[17:41:33] <ravioli> (Warning: python3-3.5.2_1 already installed)
[17:42:11] <tos9> Well, sounds like it's installed then :)
[17:42:16] <tos9> Do you have a /usr/local/bin/python3?
[17:42:54] <ravioli> tos9: I do
[17:43:00] <tos9> Great
[17:43:14] <ravioli> the problem I'm running into is that pip (and pip3) aren't available commands anymore.
[17:43:15] <tos9> /usr/local/bin/python3 -m pip install -U pip for e.g. would upgrade your pip
[17:43:19] <ravioli> aah.
[17:43:26] <tos9> Sounds like /usr/local/bin insn't properly on your PATH then.
[17:44:00] <ravioli> echo $PATH reports it's there
[17:44:16] <ravioli> and running the command you listed tells me pip is up-to-date. this is bizzare.
[17:44:17] <Wooble> it sounds vaguely like sudo pip removed the old pip and then refused to install a new one because root didn't own the caches?
[17:44:24] <tos9> Possibly that
[17:44:37] <Wooble> (but left the module?)
[17:44:38] <tos9> ravioli: Run /usr/local/bin/python -m pip install -U pip --force-reinstall
[17:44:55] <ravioli> tos9: python, or python3?
[17:44:59] <tos9> python3
[17:45:19] <ravioli> running...
[17:45:51] <ravioli> PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/site-packages/pip-8.1.2.dist-info/DESCRIPTION.rst' -> '/var/folders/_x/fcr0qgmd37z3m871pjc2qqyc0000gn/T/pip-vi1yo7p0-uninstall/usr/local/lib/python3.5/site-packages/pip-8.1.2.dist-info/DESCRIPTION.rst'
[17:46:14] <ravioli> my environment is a bit fucked up due to previous less-than-best-practices things, if you couldn't tell.
[17:46:23] <Wooble> ravioli: brew doctor may be able to fix it.
[17:47:14] <ravioli> exits with no errors.
[17:51:12] <Wooble> I'd probably liberally apply sudo chown -R in that situation, but I may be crazy :)
[17:51:40] <Wooble> disclaimer: I've just rm -rf /usr/local on my mac many times over the years as I got annoyed with homebrew :)
[18:15:02] <tdsmith> if you `brew reinstall python3` maybe that will do something worthwhile
[18:39:35] <ravioli> tdsmith: trying that now
[18:42:06] <ravioli> tdsmith: heh. it actually explicitly says that pip was installed during the reinstallation, but pip and pip3 still don't exist in /usr/local/bin (or anywhere else in my path)
[18:42:31] <tdsmith> ravioli: care to share brew gist-logs python3?
[18:47:34] <ravioli> tdsmith: PM'ing you.
[18:49:01] <tdsmith> ravioli: yeah, you have stuff owned by root
[18:49:07] <tdsmith> "error: could not delete '/usr/local/lib/python3.5/site-packages/pip/__init__.py': Permission denied"
[18:49:34] <tdsmith> i would try `sudo rm -rf /usr/local/lib/python3.5/site-packages/pip; sudo chown -R $USER /usr/local/lib/python3.5/site-packages; brew postinstall python3`
[18:52:26] <ravioli> tdsmith: if you're ever in Maine, let me know, I owe you a beer.
[18:53:04] <tdsmith> šŸŽ‰
[18:53:05] <ravioli> that worked like a charm. pip3 is now in /usr/local/bin.
[20:03:42] <ninjaaron> Hi. I notice that many popular packages now have a different script being generated by entry_points, but my packages (and others) still have the same crappy scripts that import pkg_resources. How can I get my packages to use the new entry_points script?
[20:09:00] <ninjaaron> I wrote a really crazy monkey patch today to get around this, but I'd like to do it like a normal human being. https://github.com/ninjaaron/fast-entry_points
[20:19:31] <ninjaaron> oh my. I just noticed that my scripts do get the new script under Ubuntu, but not under Arch, which some others do. This problem does not seem to occur in a venv.
[20:59:03] <ninjaaron> Answer: I'm installing with pip, but I'm building with setup.py. derp.
[20:59:30] <ninjaaron> I still don't understand how this yields different behavior on different distros.
[20:59:48] <ninjaaron> but I guess that's the magic of packaging for Linux.
[23:53:37] <dstufft> ninjaaron: wheel
[23:54:12] <dstufft> ninjaaron: when installing from wheel, pip generates the scripts, when installing from sdist setuptools does, if the "wheel" package is isntalled, pip will attempted to always build a wheel (and cache the built wheel)