3

I am following the documentation in here

First installation issue (Solved):

It is suggested to install pyside6 in a virtual environment, so I follow each step.

python -m venv env

env\Scripts\activate.bat

pip install pyside6

However, I get the warning prompt:

"Could not find a version that satisfies the requirement pyside6 (from versions: ) No matching distribution found for pyside6"

I tried installing other packages like pandas to check if pip was the problem. But there was no issues installing it into the environment.

Update: as mentioned by @eyllanesc the python version must be >=3.6 and must be 64-bit python (not mentioned in the doc page I looked at)

Second installation issue:

However, a related issue to installing PySide6 is when I try to install PySide6 with other packages in a conda environment using pip (PySide6 is not available in conda yet).

Using the anaconda prompt,

conda create --name test_env python=3.9.5 then

pip install PySide6

At this point running PySide6 modules will have no problem. But if I add certain libraries then there will be an issue:

conda activate test_env

conda env update --file test_env.yml #includes pandas, matplotlib, seaborn, and requests

The error below will show up:

enter image description here

I tried reversing the order by building the conda libraries first:

conda env create --file test_env.yml then

pip install PySide6

The same error will show up.

So upon installing each package one by one after installing PySide6, I learned PySide6 starts to fail and show the error after I do conda install matplotlib or conda install seaborn (as it installs matplotlib as well)

Update: upon checking further, there is a compatibility issue with matplotlib and PySide6 at the moment as shown here

Pherdindy
  • 1,168
  • 7
  • 23
  • 52
  • what is your python version? – eyllanesc Jun 16 '21 at 16:02
  • pyside6 is available for python >=3.6, <3.10 as pointed out by pypi: https://pypi.org/project/PySide6/ – eyllanesc Jun 16 '21 at 16:03
  • I did `python --version` earlier to check if I satisfied that and it did. python 3.7.4 – Pherdindy Jun 16 '21 at 16:04
  • Is your python 32 bit or 64 bit? PySide2 is available only for 64bits – eyllanesc Jun 16 '21 at 16:05
  • It's in 32-bit that could explain it. The python i'm using for this environment is only 32-bit. They should've noted that under requirements of the tutorial page instead of just a python version higher than 3.6 – Pherdindy Jun 16 '21 at 16:06
  • Yes, I got confused, I wanted to write pyside6. I recommend you remove the virtualenv, uninstall the 32-bit python and install the 64-bit one – eyllanesc Jun 16 '21 at 16:08
  • You say: *They should've noted that under requirements of the tutorial page instead of just a python version higher than 3.6*, maybe you should report it as a bug from the docs but as I already pointed out: use 64-bit python – eyllanesc Jun 16 '21 at 16:09
  • @eyllanesc Thanks, will make a note – Pherdindy Jun 16 '21 at 16:11
  • @eyllanesc Do you happen to know why they suggest to install pyside6 in a different environment? They specifically recommend a virtual environment `venv` or `virtualenv`. I actually decided to include the pyside6 package inside my conda environment together with other packages that I will use for my project using `conda create --name hjf_data_extraction python=3.9.5 pandas matplotlib seaborn requests` followed by `pip install pyside6` in the anaconda prompt (since pyside6 is not in conda). However, the one built as shown in the question works and the one in conda doesn't work using same code. – Pherdindy Jun 28 '21 at 03:32
  • It is bad practice to interleave conda and pip commands in the same environment. Use conda install for all packages exclusively, unless a particular python package is not available in conda format. Then use pip as a last resort, because pip will NOT add the package to the conda package index for that environment. Using conda, then pip, then conda, then pip, then conda, etc. to build an environment will eventually give a corrupted conda environment index. See this article: https://www.anaconda.com/blog/using-pip-in-a-conda-environment – Rich Lysakowski PhD Oct 12 '21 at 07:48
  • This answer is probably here. [https://stackoverflow.com/questions/51367446/pyside2-application-failed-to-start/51563781#51563781] – Haru Nov 10 '21 at 03:04

0 Answers0