PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Friday the 8th of May, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:21:33] <wt> dstufft, fwiw, i am using python 2.7 with version 1.5.6 of pip (according to pip --version)
[00:23:20] <wt> dstufft, oh, and it's the system python on ubuntu 15.04
[08:51:10] <joar> if you have your package in ./src and use package_dir={
[08:52:53] <joar> if you have your package in ./src and use package_dir={'': 'src'}, the package will have different paths depending on if it's being installed or published. I need to know where my package is because I'm exec'ing a version.py file from the package in setup.py.
[09:25:24] <mgedmin> joar, do you have a question? ;)
[09:26:07] <joar> I do, it's well hidden in there though :)
[09:26:28] <joar> I'm solving my problem by checking if src/ exists and reading from there
[09:27:42] <mgedmin> in setup.py you can assume src/ exists
[09:28:26] <joar> ok
[09:50:34] <ronny> joar: what do you mean by 'published'
[10:50:29] <joar> ronny: python setup.py sdist upload
[10:50:49] <joar> ronny: seems like I had some gremlins in my code though, so I could be wrong
[11:22:49] <ronny> joar: a sdist looks the same as a upload
[11:22:59] <ronny> joar: do you have c extensions?
[11:23:05] <joar> ronny: no
[11:23:24] <ronny> then consider publishing a wheel as well
[11:23:30] <ronny> ideall universal
[11:24:14] <joar> It looked to me like I had my package in the src/ directory when running setup.py in my working tree, but when I installed the package in another environment the packages were in the top level.
[11:26:46] <ronny> joar: installation to a target will put the packages into the toplevel, but installation is different from building a source distribution
[11:56:41] <joar> ronny: the problem was that I was trying to parse src/mypkg/version.py in my setup.py, and 'src' didn't exist when I installed the package.
[11:59:34] <mgedmin> but setup.py also doesn't exist when you install the package
[12:06:13] <joar> mgedmin: not even with source dists?
[12:06:40] <joar> I'm pretty sure it exists in source dists
[12:07:06] <mgedmin> my point is: either you have setup.py and src/mypkg/version.py, or you have .../lib/pythonX.Y/site-packages/mypkg/version.py and no setup.py
[12:07:22] <mgedmin> so I'm not sure why setup.py would need to consider both possible locations for version.py
[12:08:03] <joar> mgedmin: when you install a source dist, the supplied setup.py gets executed AFAICT.
[12:08:32] <joar> and by when i mean when, not after
[12:08:39] <joar> i.e. during installation
[12:08:39] <mgedmin> during, yes
[12:10:24] <nicolimo86> excuse me guys...has anyone installed pip on mobaXterm?
[12:19:18] <joar> This is a puzzling error: Can't uninstall 'tinbox-client'. No files were found to uninstall.
[12:22:43] <mgedmin> nicolimo86, I'm guessing not, since nobody's replying, but I'm curious: what's mobaXterm?
[12:27:10] <nicolimo86> it's a software like cygwin, used by sys admins (http://mobaxterm.mobatek.net/)
[12:29:08] <ronny> mitsuhiko: does it provide a python?
[12:29:14] <ronny> whops eh nicolimo86
[12:29:18] <nicolimo86> I installed python on it
[12:30:12] <nicolimo86> but when I run: python get-pip.py
[12:30:18] <nicolimo86> I get this message:
[12:30:27] <nicolimo86> Could not find a version that satisfies the requirement pip (from versions: ) No matching distribution found for pip
[12:32:28] <nicolimo86> the python version is 2.7
[12:32:52] <mgedmin> interesting
[12:32:55] <nicolimo86> python version 2.7.9
[12:33:09] <mgedmin> is python built with ssl support?
[12:33:36] <nicolimo86> that's a good question...i dont know
[12:33:41] <mgedmin> can you test python -c 'import urllib; urllib.urlopen("https://pypi.python.org/simple/pip").read()' ?
[12:34:09] <nicolimo86> yes
[12:34:38] <nicolimo86> IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
[12:34:58] <nicolimo86> i guess no :-(
[12:46:23] <mgedmin> ooh, is somebody man-in-the-middle'ing you?
[12:46:47] <mgedmin> more likely one of the libraries in your ssl stack cannot handle SNI, or sufficient number of SANs
[12:47:16] <mgedmin> you can work around this -- download the setuptools + pip wheels to a local directory
[12:47:23] <mgedmin> then follow the instructions for offline pip installs
[12:47:31] <mgedmin> pip itself bundles requests which _should_ handle SSL fine
[12:47:41] <mgedmin> (it doesn't use python stdlib's urllib with its quirks)
[12:47:59] <mgedmin> I'd link you about the get-pip command line args for offline installs, but I have to run
[12:52:31] <nicolimo86> @mgedmin I've already downloaded the get-pip.py and I tried to install it from a local directory
[12:53:02] <ronny> nicolimo86: to fully run the local download a few more files and options are needed
[12:53:06] <nicolimo86> I think the man in the middle is the proxy of my work....I think
[12:53:44] <mitsuhiko> nicolimo86: are you in a company?
[12:53:50] <mitsuhiko> yeah, good luck
[12:54:27] <mitsuhiko> as far as i know there is no way to disable SSL verification and pypi is now forcing SSL on you
[12:55:33] <nicolimo86> why good luck?
[12:56:21] <nicolimo86> ah ok
[13:29:42] <ronny> dstufft: btw, any oppinion on providing pip with a way to install packges into a python "foreign" to it, so pip could be in a virtualenv different from the python receiving the pacakges?
[13:41:57] <DanielHolth> it can't do that already?
[13:43:27] <mgedmin> there's pip install --target and there's pip install --root and I've no idea what those do
[13:43:38] <tomprince> DanielHolth: I think that ability was removed as being fragile.
[13:52:58] <dstufft> It was removed before because it was super hacky
[13:53:20] <dstufft> -E it was called, and it created a virutal env (or used ane xisting one) and it would essentially just re-exec itself in that virtualenv
[13:53:34] <dstufft> but it had a lot of the same problems that re-execing virtualenv.py has, so it was removed
[13:53:56] <dstufft> if someone comes up with a way that isn't fragile as hell, then it's certainly a possibility
[13:55:06] <ronny> dstufft: it already invokes python for handling installation , my idea would be to support obtaining the metadata for virtualenvs from them, and just doing installation/file removal based on metadata
[13:55:37] <ronny> (so install would invoke egg_info/install with the target python)
[13:56:35] <dstufft> ronny: what about for wheels?
[13:57:45] <ronny> dstufft: it needs to obtain the target binary tags to pick the right ones
[13:58:17] <ronny> dstufft: hmm, actually wheels make it a lot more easy
[14:02:24] <DanielHolth> it seems like you should be able to just run a script in the target environment to print all the necessary destination paths, and then unpack the wheel that way.
[14:02:58] <DanielHolth> and the tags I guess.
[14:03:28] <DanielHolth> and if you actually had to build something, then you have a problem.
[14:03:52] <ronny> DanielHolth: the target python can be used for building just as well
[14:04:26] <ronny> alltho there should be some sanity checks, it would be nice if pip errored out early instead of setup.py stubmling uppon missing gcc
[14:05:02] <DanielHolth> I think you have to just let setup.py fail if it's going to.
[14:05:16] <DanielHolth> Yes pip already has to run setup.py in a subprocess
[14:05:49] <ronny> DanielHolth: the errors are already confusing on stock linux, its probably worse if its on windows
[14:06:04] <DanielHolth> A different way is to just make an executable zip of pip and run that with the target python. Then pip isn't importable in the target environment.
[14:06:21] <ronny> hmm
[14:06:23] <DanielHolth> pip has no way to know in general why setup.py might fail
[14:06:54] <DanielHolth> would you check that fortran compiler is installed for certain scipy packages?
[14:07:41] <ionelmc> speaking of scipy packages
[14:07:54] <DanielHolth> for science
[14:07:55] <ronny> DanielHolth: i'd suggest handlign only the simple cases and have the complex ones be handled by build tool support later (or if someone can provide a comprehensible tested patch)
[14:08:19] <ionelmc> has anyone ever talken to the person making these wheels here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ ?
[14:08:26] <DanielHolth> I would suggest improving the error messages in setuptools
[14:08:51] <ionelmc> why doesn't he make a pypi repo (there's free hosting for that at binstar, and probably others)
[14:09:59] <DanielHolth> for a long time they were bdist_wininst exe's
[14:10:51] <tomprince> If the links weren't all js, it would already work as one. :/
[14:11:04] <ionelmc> tomprince: hotlink protection
[14:11:08] <ronny> DanielHolth: pip should just provide a message that this is a package with extensions and no wheel was found, if it errors compiler installation may be necessary, potentially linking documentation
[14:11:12] <ionelmc> seems he wants to save bandwidth
[14:11:15] <DanielHolth> seems so
[14:11:40] <dstufft> hm
[14:11:57] <dstufft> maybe we should just talk to him about giving him a place to put them where he's not paying for bandwidth
[14:12:03] <dstufft> we == the PSF
[14:12:04] <ionelmc> but god damn it, binstar can host all that for free!
[14:12:12] <DanielHolth> that's no moon
[14:13:00] <ionelmc> DanielHolth: moon?
[14:20:20] <DanielHolth> it's a bin star
[15:05:01] <DanielHolth> ronny do you expect to parse the target setup.py with AST looking for extensions keywords to the setup call, hoping that the user didn't collect the arguments into a dict and call just setup(**arguments), or perhaps look for Extension()
[15:23:28] <ronny> dstufft: i suspect anything short of obtaining the distribution and iterating it and its features for extension wont do
[15:54:47] <tdsmith> Gohlke works in my department; I've worked on projects with their lab. Never met the guy
[19:11:51] <iCHAIT1> hi
[19:12:09] <iCHAIT1> I am having a problem with the working of pip
[19:12:21] <iCHAIT1> I googled a lot but am not able to find a fix
[19:12:36] <iCHAIT1> Here's the screenshot
[19:12:37] <iCHAIT1> http://cl.ly/image/1J3g30240v07
[19:13:06] <iCHAIT1> I am on a macbook air os x 10.10
[19:15:00] <iCHAIT1> Any help??
[19:16:33] <ronny> iCHAIT1: did you do an os update?
[19:17:16] <iCHAIT1> ronny: I updated my OS 10 hours back.
[19:17:34] <iCHAIT1> Though I was having the same problem before updating as well.
[19:17:50] <tdsmith> are you using homebrew?
[19:17:55] <iCHAIT1> yes
[19:18:14] <tdsmith> does `brew doctor` say anything interesting? `brew link python` or `brew reinstall python` may work or provide informative error messages
[19:19:38] <iCHAIT1> I did not install python using homebrew
[19:19:53] <iCHAIT1> So maybe that is why it is not showing up anything like that.
[19:19:54] <tdsmith> pip thinks you did!
[19:20:22] <iCHAIT1> Okay
[19:20:23] <tdsmith> what python are you using?
[19:20:27] <iCHAIT1> 2.7
[19:20:36] <tdsmith> how did you install it?
[19:20:52] <iCHAIT1> from the python website
[19:21:30] <iCHAIT1> I just did brew doctor and it does not anything that you mentioned.
[19:21:40] <iCHAIT1> *show anything
[19:21:42] <tdsmith> `python -m pip install -U --force-reinstall pip` will probably rewrite the stubs correctly
[19:22:24] <iCHAIT1> What seems to be the problem?
[19:23:25] <tdsmith> probably what happened is that homebrew's python was installed as a dependency of something, which installed a pip script, which was leftover when homebrew's python was subsequently uninstalled
[19:24:10] <iCHAIT1> Okay.
[19:24:22] <iCHAIT1> Well i didn't touch anything onn the system.
[19:24:43] <iCHAIT1> everything was working fine till yesterday.
[19:24:53] <iCHAIT1> But then suddenly pip stopped working.
[19:25:20] <iCHAIT1> Moreover I receive the same error when I do easy_install.
[19:25:35] <iCHAIT1> :/
[19:25:40] <tdsmith> you'll probably want to reinstall setuptools the same way
[19:26:07] <iCHAIT1> python -m setuptools install -U --force-reinstall setutools
[19:26:10] <iCHAIT1> ?
[19:26:43] <tdsmith> `pip install -U --force-reinstall setuptools` if your pip script is working again
[19:27:12] <iCHAIT1> Okay I shall try now.
[19:28:35] <iCHAIT1> http://cl.ly/image/2B1Y3S3Z1H03
[19:28:56] <iCHAIT1> Still gives the same error.
[19:28:57] <iCHAIT1> :(
[19:30:15] <tdsmith> that's interesting. what are `python -h | head -1` and `python -m pip -V`?
[19:30:49] <iCHAIT1> http://cl.ly/image/1Q0w1k3d272W
[19:31:17] <iCHAIT1> http://cl.ly/image/0K123O1O2p0L
[19:31:54] <tdsmith> that looks right. maybe try `rm $(which pip) $(which easy_install)` and trying to reinstall pip again
[19:33:56] <iCHAIT1> ok
[19:37:19] <iCHAIT1> I removed both the items
[19:37:23] <iCHAIT1> http://cl.ly/image/2o0e0M3R3V1y
[19:48:20] <tdsmith> iCHAIT1: use the `python -m pip...` command to reinstall pip
[19:48:27] <tdsmith> the pip module is still there
[19:49:50] <iCHAIT1> http://cl.ly/image/2h2t3U1F3p10
[19:50:06] <iCHAIT1> still not working
[19:58:58] <tdsmith> i wonder where it installed pip
[19:59:56] <iCHAIT1> well, me too
[20:00:59] <iCHAIT1> this might be helpful
[20:01:00] <iCHAIT1> http://cl.ly/image/1H1w2K0q421Z
[20:02:02] <tdsmith> yeah actually, grep for bin in that RECORD file
[20:02:51] <iCHAIT1> http://cl.ly/image/2e3C2F1K2T0c
[20:03:34] <tdsmith> does /usr/local/bin/pip exist?
[20:04:01] <iCHAIT1> yes as per the screenshot I just shared
[20:04:19] <tdsmith> which screenshot was that?
[20:04:31] <iCHAIT1> http://cl.ly/image/2e3C2F1K2T0c
[20:04:52] <tdsmith> i don't think that answers the question
[20:04:57] <tdsmith> can you invoke /usr/local/bin/pip?
[20:05:06] <iCHAIT1> NO i cannot.
[20:05:24] <tdsmith> then there is an inconsistency between what pip claims it has done and what pip is actually doing
[20:05:32] <iCHAIT1> okay.
[20:05:43] <iCHAIT1> Then what should I do?
[20:06:17] <tdsmith> what happens when you try to invoke /usr/local/bin/pip?
[20:06:19] <tdsmith> dunno! invoking pip using `python -m pip` instead of `pip` will definitely work
[20:07:09] <iCHAIT1> when I invoke /usr/local/bin/pip
[20:07:25] <iCHAIT1> it gives unknown command
[20:07:43] <tdsmith> so the file does not exist?
[20:07:44] <iCHAIT1> And yes you are right
[20:07:51] <iCHAIT1> python -m pip is working
[20:08:26] <tdsmith> dstufft: can you imagine a situation where /usr/local/bin/pip would end up in RECORD but not actually get written to disk?
[20:08:34] <iCHAIT1> But pip should also work, right?
[20:09:00] <tdsmith> oughta, yeah
[20:09:44] <dstufft> tdsmith: um
[20:09:44] <iCHAIT1> I just realized that easy_install was not removed successfully.
[20:09:47] <dstufft> not off the top of my head
[20:10:00] <iCHAIT1> But I don't think it affects our cause.
[20:10:28] <iCHAIT1> Or should i remove it?
[20:10:50] <iCHAIT1> http://cl.ly/image/2W2D2T11140t
[20:11:12] <tdsmith> leave anything in /usr/bin alone
[20:11:33] <iCHAIT1> Okay.
[20:12:13] <iCHAIT1> should I try "sudo easy_install pip"
[20:12:14] <iCHAIT1> ?
[20:12:28] <iCHAIT1> Though it won't work.
[20:12:30] <tdsmith> my last idea is adding `--no-use-wheel` when installing pip, like `python -m pip install -U --force-reinstall --no-use-wheel pip`
[20:12:44] <tdsmith> i don't see that helping, no
[20:12:50] <iCHAIT1> OKay
[20:13:06] <iCHAIT1> On it.
[20:13:48] <iCHAIT1> http://cl.ly/image/1c1g3H291z38
[20:13:51] <iCHAIT1> Still the same.
[20:13:52] <iCHAIT1> :(
[20:15:56] <tdsmith> just for completeness, what's `file /usr/local/bin/pip` say?
[20:17:03] <iCHAIT1> No such file or directory.
[20:17:23] <dstufft> what if you do this
[20:17:33] <dstufft> python -c "import pip.locations; print(pip.locations.distutils_scheme('pip'))"
[20:18:05] <iCHAIT1> http://cl.ly/image/3m0o2F3Q1N02
[20:18:30] <iCHAIT1> dstufft: ^output
[20:18:44] <dstufft> the value to scripts is where you're going to find the ``pip`` script
[20:19:32] <tdsmith> :x
[20:19:48] <iCHAIT1> Okay, then what?
[20:20:24] <dstufft> not sure what your question is, pip doesn't decide where to put script files, it just asks the Python interpreter. Your Python was compiled in a way so that the scripts go into that directory
[20:20:46] <dstufft> if you don't want them to go there, I think you can control it with a config file, or you can get your Python from somewhere that doesn't put it in that dir
[20:21:18] <dstufft> I perosonally use pyenv to get my Pythons, however Homebrew is also a good choice
[20:21:31] <iCHAIT1> should I unsinstall my current python and install it with homebrew?
[20:21:34] <tdsmith> heh. i thought the python.org build shipped configured to /usr/local/bin
[20:22:01] <tdsmith> you could do that or you can add the scripts dir to your PATH
[20:22:33] <tdsmith> thanks for that incantation dstufft; I was googling for it
[20:22:56] <iCHAIT1> You mean to say that I should add the scripts path to my bash/ fish config file, right?
[20:23:09] <tdsmith> however you configure your PATH, sure
[20:23:23] <iCHAIT1> Okay.
[20:23:40] <iCHAIT1> Actually its quite late in the night here.
[20:23:48] <iCHAIT1> I nedd to get some sleep.
[20:24:14] <iCHAIT1> I'll try and talk to you guys tomorrow.
[20:24:39] <iCHAIT1> Thanks a lot, you were really helpful.
[20:24:40] <iCHAIT1> :)
[20:25:23] <iCHAIT1> I believe adding to my PATH should fix this.
[20:25:30] <tdsmith> you're welcome! good night
[20:29:58] <tdsmith> yeah i've been wrong, the python.org build is configured with a /Library scripts path. tmyk