Hi folks! Today it’s about getting PySide and Python3.6 to work together using Anaconda.
Intro
In my last post I welcomed you to my blog. I already thought about writing a little How-To on getting PySide working together with Python 3.6. We will do this using Anaconda and on a Windows10 machine. This would be the simplest setup for this. If you want to know how to do this on a Linux machine or even a RaspberryPi (Raspbian), feel free to leave a comment and I will create a follow-up about it!
When you need to use PySide together with Python3.6 (anything newer than 3.4 in fact) you will definitely run into trouble. This is because PySide was developed depending on Qt4. Python changed to Qt5 though. When googling about it, one of the first links you probably ran across is from Stackoverflow. That one didn’t help me too much, when I had to do this. Therefore I created this post!
About Anaconda
I will update this post to be a bit more detailed and include some info about ‘Conda. For the impatient, I wrote a very short summary of the steps to take. Just read on
Step-by-step guide
Follow this 6 simple steps and you are ready to go:
- Download and Install Anaconda with Python3 here (opens in new tab).
- Install Anaconda and start the Anaconda Navigator
- Create a new Python3-Environment:
- Click on Environment in the Anaconda Navigator
- Click on create
- Give the environment an name and make sure you have Python 3.6 (or newer) selected
- Creating the environment will take a moment
- Click on Environment in the Anaconda Navigator
- Select your newly created environment and open a terminal with it
- Click on the “play”-Button and choose “open Terminal”
- Click on the “play”-Button and choose “open Terminal”
- Get PySide from conda-forge entering
conda install -c conda-forge pyside
in the freshly opened terminal - Accept installing the listed dependecies (by hitting ‘y’ – enter)
- Use whatever module you needed PySide and Python3.6 for 🙂
It is incredibly easy and done in 10 minutes if you know what to do. I needed like days to figure this out.
Is everything working fine for you or do you have any questions? Please contact me, so I can see if I’m able to help you.
Over and out
Chrisys
thanks. it worked like a charm
THanks, though it doesn’t seem to work any more. I get conflicts:
UnsatisfiableError: The following specifications were found to be incompatible with each other:
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package vs2015_runtime conflicts for:
python=3.6 -> vs2015_runtime
Package libxslt conflicts for:
pyside -> libxslt
Package vc conflicts for:
python=3.6 -> vc[version=’14.*|>=14,=14.1, vc[version=’10.*|14.*|9.*|14|9′]
Package pip conflicts for:
python=3.6 -> pip
Package qt conflicts for:
pyside -> qt=4.8
Package sqlite conflicts for:
python=3.6 -> sqlite[version=’>=3.25.3,=3.26.0,=3.29.0,<4.0a0']