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
Cannot import workalendar in ipython (DistributionNotFound) #74
Comments
I'm not sure about this. Will investigate. but... later ;o) |
I can't reproduce the bug, I'm afraid. Using my "OS" IPython (installed via apt-get), it works. I think that this DistributionNotFound issue could be related to your own setup (strange PYTHONPATH? weird ipython install and mangle in the paths?). The fact that it's working with the stock python binary is a clue, methinks. I'm keeping this issue opened ; you may want to report your investigations here, in case it could be useful to somebody else. |
Can't reproduce either. I think this issue can be closed for now. |
To be honest, I don't remember making this issue, but I've just tried again on a new laptop and I can still reproduce the issue. It seems a bit more nuanced than I originally made out. # WORKS (venv pip-installed ipython v4.0.2)
virtualenv ve
. ve/bin/activate
pip install workalendar
pip install ipython
ipython -c "import workalendar"
# DOESN'T WORK (globally pip-installed ipython v4.0.2)
virtualenv ve
. ve/bin/activate
pip install workalendar
ipython -c "import workalendar"
# DOESN'T WORK (the weirdest)
virtualenv ve
. ve/bin/activate
pip install workalendar
ipython -c "import workalendar" # Nope
pip install ipython
ipython -c "import workalendar" # Nope |
Could you just make sure, the local ipython is used in the last example by running
|
|
Running ipython itself in the venv is working? |
Yep |
Although that's strange - it still has that warning about "attempting to work in a virtualenv". |
I tried all your examples and they all worked well. Is it possible four you to uninstall the global ipython package? Maybe only this is broken and not workalendar itself, as a complete local venv setup worked for you. |
It looks like when you run global IPython inside a virtualenv, then install IPython within that same virtualenv, it still somehow uses the global version, even though 'which' reports otherwise. That would mean that the problem relating to workalendar is that it doesn't work in a globally pip-installed version of IPython when it's installed in a virtualenv. |
Well, I'm not sure if it is only a workalendar related issue. |
Indeed, it seems that the issue is really an IPython one. |
So this issue can be closed here? |
It is, of course, up to you whether you want to investigate how this can be mitigated, but if it were up to me I'd probably close it and get on with more important things :) |
sorry it took so long. did you manage to solve it? |
Hi, I also have problem with "DistributionNotFound"
I fix it by update setuptools to newest version. |
could you please give me the result of the command |
|
maybe we could get rid of this issue by forcing a certain version of setuptools, or define a minimum version. On my (old) 14.04 Ubuntu LTS, the stock setuptools version is With 3.3 it works like a charm. Maybe we could just add this line in the requirements:
(sidenote: is it me or is the versionning of setuptools became insane?) |
Yes |
this version is known to be buggy and causes ``DistributionNotFound`` exceptions.
working on it, incoming micro-PR. |
… ``DistributionNotFound`` exceptions with obsolete versions
It works when I use the normal python console, but not with ipython. I've tried with and without ipython installed in the virtualenv (it's installed globally).
Steps to recreate:
My pip freeze:
pip version:
setuptools version:
The text was updated successfully, but these errors were encountered: