-
Notifications
You must be signed in to change notification settings - Fork 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
namespaced dependencies cannot be found in a custom PYTHONPATH #8505
Comments
Without looking deep into it, this feels like a Python import logic issue, since pip does not handle namespace packages specially in any way afaik. |
@uranusjr so the namespace packages just happen to work when they are not in a custom PYTHONPATH? I'm not too familiar with python import logic, should I post a ticket somewhere else? Thanks for your advice |
One important thing to do here is to reduce the example to minimise the moving parts in it, and determine whether pip or Python is at fault here. The reduced example should contain as little as possible, and be reliably reproducible from scratch. For example, this is what I tried from reading your description:
Everything installs and imports correctly, so it seems that neither |
hi, thanks for your suggestion, I tried to minimize the moving parts in the "Steps to reproduce" section
You may note that i used
which result in
|
Not sure if this a new problem or just the same:
For whatever reason, only one namespace package content survives but the dist-info files are there for both:
Installing it without
|
The original report was specific to Python 2, so I'm going to close this. (It's a limitation in Python's import system and not related to pip.) @jankatins I am not sure if your issue is the same and you should probably open a new issue. |
Describe the bug
Using the latest stable version of pip, I am trying to install
twisted
(which depends on zope.interface), on a custom PYTHONPATH location.This env variable is set to
and both twisted and and zope.interface are installed correctly
The package
twisted
can be loaded just fine --zope.interface
however cannot be foundFollowing the advice from here pyinstaller/pyinstaller#502 if I manually add an empty
__init__.py
tostack/lib64/python2.7/site-packages/zope
then the module becomes discoverableExpected behavior
I don't think it should be required to manually add the init file to the PYTHONPATH location. Even this is a namespaced module it should be discoverable in the custom PYTHONPATH location like any other module.
To Reproduce
PYTHONPATH
to a custom locationpip install --ignore-installed --prefix=$STACK_PREFIX twisted
zope.interface
in pythonMy Platform
The text was updated successfully, but these errors were encountered: