thidev
Posts: 3
Joined: Thu Jul 13, 2017 10:44 am

ModuleNotFoundError: No module named 'PySide'

Thu Jul 13, 2017 11:42 am

Please help me - I have spent few days reading forums to fix that issue (No success so far).

I still get this error
import PySide.QtCore
ModuleNotFoundError: No module named 'PySide'

(using Mac OR using my raspberry pi)

Traceback (most recent call last):
File "/Users/macbookair/Documents/Python/Learning Python Chapter Files/chapter4-turtle.py", line 3, in <module>
from PySide.QtCore import *
ModuleNotFoundError: No module named 'PySide'

I have python3 installed.
I have installed PySide using several different commands such as
sudo apt-get install python-pyside
sudo apt-get install python3-pyside
sudo apt-get install python3 python3-pyqt5

in the Mac tried
brew install python3 #This worked
brew install qt5 . #This worked - qt 5.9.1 is already installed

Some people say the problem is on the path, so
I have tried (I have Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04))

export DYLD_LIBRARY_PATH=/usr/local/lib/python3.6.1/site-packages/PySide

I tried
export PATH=/usr/local/bin:$PATH

export PATH=/usr/local/share/python:$PATH
export PATH=/usr/local/share/python3:$PATH

brew install pyqt
export PYTHONPATH=/usr/local/lib/python:$PYTHONPATH
export PYTHONPATH=/usr/local/lib/python3:$PYTHONPATH

brew install zmq
pip install pyzmq
pip install pygments

This freak error still happen


When I type import PySide I always get the error below:

>>> import PySide
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PySide'

thidev
Posts: 3
Joined: Thu Jul 13, 2017 10:44 am

Re: ModuleNotFoundError: No module named 'PySide'

Thu Jul 13, 2017 4:33 pm

I solved one of the problems (Using Raspberry pi 3).

Update before installing python3-pyside . Do it in the order below:

In LXTerminal:

Code: Select all

sudo apt-get update
install python3-pyside:

Code: Select all

sudo apt-get install python3-pyside
Open Python 3 in the LXTerminal:

Code: Select all

python3
"Call" the Pyside:

Code: Select all

import PySide
Check the version you have just installed:

Code: Select all

PySide.__version__

Return to “Troubleshooting”