AcademySoftwareFoundation / AcademySoftwareFoundation/rez
[Windows] PySide2 not working with Python-3.8+
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 374
- Avg merge
- 9d 12h
- Merged PRs (30d)
- 5
Description
Platform: `Windows 10`
Rez version: `2.103.4`
**This issue is not Rez-dependent but this is strongly related to its way of working (separated packages).**
## TL;DR
As far as I know, the use of `PySide2` with `Python-3.8+` via `Rez` seems impossible on Windows.
## Description
I recently installed `Rez` on my Windows 10 computer. To follow the [VFX Platform](https://vfxplatform.com/) recommendations, I wanted to work with `Python-3.9` and `PySide2-5.15`.
After installing `PySide2` (and its dependency `shiboken2`) via `rez-pip`, I tried to run a Python shell and to `import PySide2`.
I instantly got an exception coming from the `PySide2\__init__.py` file. Actually, as we can see in the code [right here](https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside2/PySide2/__init__.py.in?h=5.15.2#n53), when using `Python-3.8+`, the file tries to deal with relative paths from `PySide2` to find the `shiboken` directory and, because it does not find it, it raises [this exception](https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside2/PySide2/__init__.py.in?h=5.15.2#n26).
I am not sure this is the good place to talk about this but I thought it was quite relevant to notice.
Contributor guide
Research direction
Reproduce on Windows 10 with Rez 2.103.4, Python 3.9, and PySide2 5.15 plus shiboken2 installed through rez-pip, then run a Python shell and import PySide2. Inspect PySide2\__init__.py and the linked upstream PySide2 setup file to compare the failing path behavior. Done should establish whether Rez is responsible and document a concrete resolution or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100