Open matthiaskoenig opened 6 years ago
Found the pip issue. This seems to be a major issue affecting many projects, so hopefully fixed soon https://github.com/pypa/pip/issues/5081 But also affecting us right now.
That's a nasty one. Let's keep this issue until the issue is resolved.
Yes, but seems this will not be fixed. This is basically the code in tellurium to install packages. But not officially supported :/ and probably only will get worse.
As I understand it, the issue is with code that uses import pip to access internal functionality of pip. We've never supported such usage officially, and we have explicitly documented that lack of support for some time now (albeit only in the "latest" version of the docs at https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program, because we haven't had a new stable release since that doc section was added). We also announced a reorganisation of the internals to make it clear that use of internal APIs is unsupported, last October (see https://mail.python.org/pipermail/distutils-sig/2017-October/031642.html). That change, which is in pip 10, will break any such usage regardless of what pip a possible pip 9.0.3 release would do. So it's hard to see this as a sudden, unexpected breakage.
I've uninstalled pip 9.0.2
H
On Mon, Mar 19, 2018 at 2:43 PM, Matthias König notifications@github.com wrote:
Yes, but seems this will not be fixed. This is basically the code in tellurium to install packages. But not officially supported :/ and probably only will get worse.
As I understand it, the issue is with code that uses import pip to access internal functionality of pip. We've never supported such usage officially, and we have explicitly documented that lack of support for some time now (albeit only in the "latest" version of the docs at https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program, because we haven't had a new stable release since that doc section was added). We also announced a reorganisation of the internals to make it clear that use of internal APIs is unsupported, last October (see https://mail.python.org/pipermail/distutils-sig/2017-October/031642.html). That change, which is in pip 10, will break any such usage regardless of what pip a possible pip 9.0.3 release would do. So it's hard to see this as a sudden, unexpected breakage.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sys-bio/tellurium/issues/354#issuecomment-374390439, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAZDkveEr7H_ojBpQ4wM69vpBBiddoJks5tgCZlgaJpZM4Sw6O_ .
Basically we have to rewrite the few lines of code used for pip imports via the following
Having said all of the above, it is worth covering the options available if you decide that you do want to run pip from within your program. The most reliable approach, and the one that is fully supported, is to run pip in a subprocess. This is easily done using the standard subprocess module:
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'my_package'])
If you want to process the output further, use one of the other APIs in the module:
reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
Thanks Matthias, I'll fix that line in Tellurium.
@matthiaskoenig : This seems as good a place to ask as any: you aren't using these tellurium wrappers for pip any more, are you? I assume that nowadays everyone just uses pip directly. I noticed them because they use distutils which is being removed in 3.12, and figured I'd just remove the functionality entirely.
Hi all, I just tried to run tellurium in a clean virtualenv and get the following error when trying to do:
or
This seems to be a bug/issue in the lates pip. Just posting this here so people will find a solution. Workaround is to down-grade pip to 9.0.1 via
Best Matthias