-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
IPython ImportError by not using absolute_import #1356
Comments
From ccordoba12 on 2013-04-16T15:05:02Z We don't have a file called spyderlib/widgets/IPython.py it's called spyderlib/widgets/ipython.py which shouldn't give any trouble. So it seems you are having a problem with your installation. I guess if you eliminate "IPython.py" from your virtualenv your problem would disappear. By the way, I reproduced the steps you mentioned in your SO post and spyder is working fine for me. |
From zaha...@gmail.com on 2013-04-16T17:08:23Z The problem seems to be that I am working in some case-insensitive file system so both files are confused by python. It's the same as here: http://stackoverflow.com/questions/6786644/importing-python-modules-on-linux-from-an-ntfs-share |
From ccordoba12 on 2013-04-23T13:49:18Z I'm unfamiliar with from future import absolute_import Jed or zahariD, do you know if it could have some unpleasant side effect? |
From zaha...@gmail.com on 2013-04-23T17:32:46Z All the imports would look the same and nothing would change in that particular file since you (mean to) use absolute imports everywhere. But a combination of NFTS case-insesitivness and python2 silly import rules turn the ipython import into a relative one. Only change would be that you would have to change the syntax if you wanted to do relative imports in the module. For example: from spyderlib.widgets.mixins import XX Would still work as it is so no change is needed. However if it was from mixins import XXX it would have to change to from .mixins import XXX Regards, Zahari. |
From ccordoba12 on 2013-06-29T14:46:57Z I'm going to take a look at this one for our next release. Summary: IPython ImportError by not using absolute_import (was: ImportError when using Spyder and Ipython in a virtualenv) |
From ccordoba12 on 2013-11-03T06:06:48Z This issue was updated by revision 7fd24502e597 .
Status: Fixed |
From ccordoba12 on 2013-11-03T06:08:03Z Sorry for the big delay in fixing this one. It'll be present in 2.3. |
From ccordoba12 on 2015-02-15T16:14:34Z Labels: -Component-IPython |
From zaha...@gmail.com on 2013-04-16T13:23:06Z
Please see this SO question: http://stackoverflow.com/questions/16023318/importerror-when-using-spyder-and-ipython-in-a-virtualenv The error is due to the to modules, the one in widgets and the ipython module itself having the same name "IPython". One way to solve it is with
from future import absolute_import
In spyderlib/widgets/IPython.py
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1356
The text was updated successfully, but these errors were encountered: