-
-
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
The PYTHONPATH manager on the Mac app does not work with the EPD64 interpreter #1321
Comments
From ccordoba12 on 2013-06-29T14:18:39Z Please update your Spyder version, it should work now. Status: WontFix |
From breed...@gmail.com on 2013-06-29T15:43:36Z I just tried it out on 2.2.0 (just downloaded it), and got the same result. "print sys.path" does not list the directories in the PYTHONPATH manager when I am using the EPD64 interpreter. |
From ccordoba12 on 2013-06-29T15:50:14Z Right, I forgot that this one was about our PYTHONPATH manager. Sorry for the inconvenience. Status: Accepted |
From breed...@gmail.com on 2013-10-21T13:34:07Z Issue still exists in Spyder 2.2.5. |
From ccordoba12 on 2013-10-21T14:13:30Z Yes, this is really tricky to solve. Currently we are hijacking PYTHONPATH to let our consoles find our own sitecustomize, which has the essential glue to make code completion and debugging work. But we also are removing PYTHONPATH completely in that sitecustomize (for external interpreters only) so that people can't import the app libraries through it. I think what I really need is a good library to manipulate env vars, so that I can easily add and remove paths from PYTHONPATH. |
From breed...@gmail.com on 2013-10-21T18:45:31Z Yeah, I was trying to figure out a work around today. When I run python from the command line I can just add directories to your $PYTHONPATH environment variable. If I install Spyder using the DMG, I am forced to add the directories at the start of every script. On the other hand, if I install Spyder using setup.py (or Macports) inside my Canopy installation and execute Spyder from the command line, then it inherits the $PYTHONPATH variable and PYTHONPATH manager works properly. (I imagine you are aware of this, Carlos. I am just putting this comment here for others.) |
From ccordoba12 on 2013-10-21T20:49:46Z Yes, now that I remember another hairy issue is that py2app adds a couple of things to PYTHONPATH that really mess up external interpreters. So what needs to be done is preserve the user's PYTHONPATH and remove all the rest! That's why it's tricky. |
From mrcl...@gmail.com on 2013-11-28T13:24:16Z I've implemented a workaround that modifies sys.path in my interpreter's startup script. This was an extension of my solution to another issue regarding shell environment variable inheritance [1]. It will take the user's PYTHONPATH as specified in either /etc/profile or ~/.profile and and insert it into the sys.path. If you don't need system environment variables transferred to Spyder's os.environ, just delete/comment out that portion of the script. My script is as follows: import os envstr = subprocess.check_output('source /etc/profile; source ~/.profile; printenv', shell=True) if env.has_key('PYTHONPATH'): [1] https://groups.google.com/forum/#!msg/spyderlib/lCXOYk-FSWI/SDm-O8HHNMsJ |
From ccordoba12 on 2013-12-11T12:41:34Z Labels: -MS-v2.3 MS-v2.3.1 |
From ccordoba12 on 2014-08-17T18:43:17Z Labels: -MS-v2.3.1 MS-v2.4 |
From breed...@gmail.com on 2013-03-17T10:32:33Z
Spyder Version: 2.2.0beta4
Python Version: 2.7.3
Qt Version: 4.8.2, PyQt4 (API v2) 4.9.4 on Darwin
What steps will reproduce the problem?
Please provide any additional information below
.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1321
The text was updated successfully, but these errors were encountered: