Opened 12 years ago
Closed 12 years ago
#38342 closed defect (invalid)
py-pyside: cannot import PySide module
Reported by: | tim@… | Owned by: | mamoll (Mark Moll) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | ||
Port: | py-pyside |
Description
sudo port install py-pyside succeeds but in Python import PySide gives "no module named PySide"
Change History (11)
comment:1 Changed 12 years ago by larryv (Lawrence Velázquez)
Owner: | changed from macports-tickets@… to mmoll@… |
---|---|
Port: | py27-pyside removed |
Summary: | py-pyside py27-pyside import PySide "no module named PySide" → py-pyside: cannot import PySide module |
comment:2 follow-up: 5 Changed 12 years ago by tim@…
Hi. It is my intention and belief that I am using MacPorts python v2.7 Other modules I've added work fine as far as I can tell.
However, I am not using the the binary in /opt/local/bin/python2.7
I have relied on port --select
Am I doing something wrong? Apart from pyside, python works fine.
For example
import sip
gives no errors; the module loads. It seems to me there is something broken specifically for pyside.
here are some diagnostics
churchill:doc tim$ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python churchill:doc tim$ port select --list python Available versions for python: none python25-apple python26-apple python27 (active) python27-apple churchill:doc tim$ sudo port install python27 Password: ---> Computing dependencies for python27 ---> Cleaning python27 ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. and an extract from port list instaled py-pyside @1.1.2 python/py-pyside py27-cairo @1.10.0 python/py-cairo py27-distribute @0.6.35 python/py-distribute py27-distribute @0.6.35 python/py-distribute py27-gobject @2.28.6 python/py27-gobject py27-libxml2 @2.8.0 python/py-libxml2 py27-lxml @2.3.2 python/py-lxml py27-nose @1.2.1 python/py-nose py27-numpy @1.6.2 python/py-numpy py27-pygtk @2.24.0 python/py-pygtk py27-pyqt4 @4.10.0 python/py-pyqt4 py27-pyside @1.1.2 python/py-pyside py27-shiboken @1.1.2 python/py-shiboken py27-sip @4.14.4 python/py-sip python27 @2.7.3 lang/python27 python_select @0.3 sysutils/python_select qt4-mac @4.8.4 aqua/qt4-mac qt4-mac @4.8.4 aqua/qt4-mac rarian @0.8.1 textproc/rarian readline @6.2.000 devel/readline
comment:3 Changed 12 years ago by mamoll (Mark Moll)
I have py27-pyside installed and cannot reproduce this. Does this directory exist?:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PySide
comment:4 Changed 12 years ago by mamoll (Mark Moll)
What is the output of this command?:
ls -l `which python`
comment:5 Changed 12 years ago by mf2k (Frank Schima)
Replying to tim@…:
and an extract from port list instaled
See the FAQ about this. Please instead use:
port installed active
comment:6 Changed 12 years ago by tim@…
Thanks for your support. I've answered your requests for more diagnostics below
(1) port installed active (see below)
(2) Does this directory exist?:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/PySide
Answer: No. The directory PySide does not exist, although the parent directory does.
(3) what is
ls -l which python
churchill:python2.7 tim$ ls -l `which python` lrwxr-xr-x 1 root admin 7 23 Sep 22:08 /Library/Frameworks/Python.framework/Versions/2.7/bin/python -> python2
port installed active
py-pyside @1.1.2_1 (active) py27-cairo @1.10.0_1+x11 (active) py27-distribute @0.6.35_0 (active) py27-gobject @2.28.6_0 (active) py27-libxml2 @2.8.0_0 (active) py27-lxml @2.3.2_0 (active) py27-nose @1.2.1_1 (active) py27-numpy @1.6.2_1 (active) py27-pygtk @2.24.0_0+x11 (active) py27-pyqt4 @4.10.0_0 (active) py27-pyside @1.1.2_1 (active) py27-shiboken @1.1.2_1 (active) py27-sip @4.14.4_0 (active) python27 @2.7.3_1 (active) python_select @0.3_2 (active) qt4-mac @4.8.4_6 (active) rarian @0.8.1_0 (active) readline @6.2.000_0 (active) sane-backends @1.0.22_4 (active) schroedinger @1.0.11_0 (active) scribus @1.4.2_0 (active) shared-mime-info @1.0_0 (active) smartmontools @6.0_0+attributelog+savestates (active) speex @1.2rc1_0 (active) sqlite3 @3.7.15.2_0 (active) sshfs @2.4_2 (active) texinfo @4.13_2 (active) tiff @4.0.3_1 (active) ufraw @0.18_3 (active) urw-fonts @1.0.7pre44_0 (active) webkit-gtk @1.10.2_2+video (active) webp @0.2.1_2 (active) x264 @20130105_1 (active) Xft2 @2.3.1_0 (active) xmlcatmgr @2.2_1 (active) xorg-bigreqsproto @1.1.2_0 (active) xorg-compositeproto @0.4.2_0 (active) xorg-damageproto @1.2.1_0 (active) xorg-dri2proto @2.8_0 (active) xorg-fixesproto @5.0_0 (active) xorg-glproto @1.4.16_0 (active) xorg-inputproto @2.2.99.1_0 (active) xorg-kbproto @1.0.6_0 (active) xorg-libice @1.0.8_0 (active) xorg-libpthread-stubs @0.3_0 (active) xorg-libsm @1.2.1_0 (active) xorg-libX11 @1.5.0_0 (active) xorg-libXau @1.0.7_0 (active) xorg-libxcb @1.9_0+python27 (active) xorg-libXcomposite @0.4.4_0 (active) xorg-libXcursor @1.1.13_0 (active) xorg-libXdamage @1.1.4_0 (active) xorg-libXdmcp @1.1.1_0 (active) xorg-libXext @1.3.1_0 (active) xorg-libXfixes @5.0_0 (active) xorg-libXi @1.6.2_0 (active) xorg-libXinerama @1.1.2_0 (active) xorg-libxkbfile @1.0.8_0 (active) xorg-libxkbui @1.0.2_0 (active) xorg-libXmu @1.1.1_0 (active) xorg-libXrandr @1.4.0_0 (active) xorg-libXt @1.1.3_0 (active) xorg-randrproto @1.4.0_0 (active) xorg-renderproto @0.11.1_0 (active) xorg-util-macros @1.17_0 (active) xorg-xcb-proto @1.8_0+python27 (active) xorg-xcb-util @0.3.9_0 (active) xorg-xcmiscproto @1.2.2_0 (active) xorg-xextproto @7.2.1_0 (active) xorg-xf86bigfontproto @1.2.0_0 (active) xorg-xineramaproto @1.2.1_0 (active) xorg-xproto @7.0.23_0 (active) xorg-xtrans @1.2.7_0 (active) xpm @3.5.10_0 (active) xrender @0.9.7_0 (active) xsane @0.998_2 (active) XviD @1.3.2_3 (active) xz @5.0.4_0 (active) zlib @1.2.7_0 (active)
comment:7 Changed 12 years ago by mamoll (Mark Moll)
That's odd. First, /opt/local/bin is probably not at the beginning of your PATH environment variable if the system-installed version of python is found before the MacPorts version. However, if that directory doesn't exist, then "import PySide" wouldn't work either if you launched /opt/local/bin/python2.7. What is the output of this command?:
port contents py27-pyside
If it lists files that don't exist, try uninstalling and reinstalling py27-pyside.
comment:8 Changed 12 years ago by tim@…
Right, my PATH was a real mess. All this time I thought macports installed python to /Library/Frameworks I'm going to fix this first, I think I will need to do quite a lot of reinstalling since many python modules are installed against a version I didn't want.
comment:10 Changed 12 years ago by tim@…
well, if I still have problems, then it will be related to a different problem, so I think so. Thank again for your help.
comment:11 Changed 12 years ago by mamoll (Mark Moll)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the ticket. In the future, please Cc relevant port maintainers.
Are you sure you’re using the correct Python? If you installed
py-pyside
, then you gotpy27-pyside
, and you need to be using/opt/local/bin/python2.7
(adjust appropriately for custom MacPorts prefix, of course).