Skip to content
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

Can't find PySide when opening from terminal #36

Closed
rtunnard opened this issue Sep 21, 2015 · 1 comment
Closed

Can't find PySide when opening from terminal #36

rtunnard opened this issue Sep 21, 2015 · 1 comment

Comments

@rtunnard
Copy link

Found a rather strange error: I don't know enough to submit a fix myself.

When opening Pineapple-Pro from the app list in the GUI, it works perfectly (lovely program btw!).

However, when opening from the terminal with:

open /Applications/Pineapple-Pro.app

it loads, but then when I try to import matplotlib.pyplot there is an import error, whose traceback culminates with:

/Users/rtunnard/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/backends/qt_compat.pyc in ()
124
125 else: # try importing pyside
--> 126 from PySide import QtCore, QtGui, version, version_info
127 if version_info < (1, 0, 3):
128 raise ImportError(

ImportError: No module named PySide

Even more strangely, I can import matplotlib by itself, and then matplotlib.pyplot.plot(range(10)) claims that matplotlib has no pyplot attribute!

Not sure if this is a problem caused by my Python setup or a program bug.

Mac OSX 10.10.5 with Enthought Canopy 1.5.0 (Python 2.7.6 64bit).

@nwhitehead
Copy link
Owner

This is almost surely a problem with environment variables and configuration. With the latest changes for the upcoming release, this should not be a problem any more. Right now variables such as PYTHONPATH and PYTHONSTARTUP are being inherited by Pineapple and passed to the internal version of python inside the app, which is using the wrong versions of things. In the upcoming release all the environmental variables should be ignored, so you'll always get the internal python in a sane state when starting Pineapple.

The workaround right now is to do "unset PYTHONPATH", "unset PYTHONSTARTUP", etc. before you do your "open Pineapple...".

If you still see this issue in the next release go ahead and reopen the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants