Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Co-installation with official PySide2 wheel #70

Closed
giumas opened this issue Jul 30, 2018 · 15 comments
Closed

Co-installation with official PySide2 wheel #70

giumas opened this issue Jul 30, 2018 · 15 comments

Comments

@giumas
Copy link

giumas commented Jul 30, 2018

The co-installation with the official PySide2 wheel brakes this latter: https://bugreports.qt.io/browse/PYSIDE-761

The issue should be related to the .qt-post-link.bat file. It looks like a qt.conf file is generated which assumes a layout different than the one PySide2 provides, and thus this leads to issues to finding the plugins.


Environment (conda list):
$ conda list
# packages in environment at C:\Users\xxxxx\AppData\Local\Continuum\miniconda3:
#
# Name                    Version                   Build  Channel
asn1crypto                0.24.0                   py36_0
ca-certificates           2018.4.16                     0    conda-forge
certifi                   2018.4.16                py36_0    conda-forge
cffi                      1.11.5           py36h945400d_0
chardet                   3.0.4            py36h420ce6e_1
conda                     4.5.8                    py36_1    conda-forge
conda-env                 2.6.0                h36134e3_1
console_shortcut          0.1.1                h6bb2dd7_3
cryptography              2.2.2            py36hfa6e2cd_0
cycler                    0.10.0                     py_1    conda-forge
freetype                  2.8.1                ha63716d_1    conda-forge
icc_rt                    2017.0.4             h97af966_0
icu                       58.2                 ha66f8fd_1
idna                      2.6              py36h148d497_1
intel-openmp              2018.0.3                      0
jpeg                      9c                   hfa6e2cd_0    conda-forge
kiwisolver                1.0.1                    py36_1    conda-forge
libpng                    1.6.34               h7602738_1    conda-forge
matplotlib                2.2.2                    py36_1    conda-forge
menuinst                  1.4.14           py36hfa6e2cd_0
mkl                       2018.0.3                      1
mkl_fft                   1.0.4                    py36_0    conda-forge
mkl_random                1.0.1                    py36_0    conda-forge
numpy                     1.14.3           py36h9fa60d3_2
numpy-base                1.14.3           py36h5c71026_0
openssl                   1.0.2o               hfa6e2cd_1    conda-forge
pip                       10.0.1                   py36_0
pycosat                   0.6.3            py36h413d8a4_0
pycparser                 2.18             py36hd053e01_1
pyopenssl                 18.0.0                   py36_0
pyparsing                 2.2.0                      py_1    conda-forge
pyqt                      5.6.0            py36h764d66f_6    conda-forge
PySide2                   5.11.1                    <pip>
pysocks                   1.6.8                    py36_0
python                    3.6.5                h0c2934d_0
python-dateutil           2.7.3                      py_0    conda-forge
pytz                      2018.5                     py_0    conda-forge
pywin32                   223              py36hfa6e2cd_1
qt                        5.6.2           vc14h6f8c307_12
requests                  2.18.4           py36h4371aae_1
ruamel_yaml               0.15.37          py36hfa6e2cd_2
setuptools                39.2.0                   py36_0
sip                       4.18                     py36_1    conda-forge
six                       1.11.0           py36h4db2310_1
sqlite                    3.24.0               hb652765_0    conda-forge
tornado                   5.1                      py36_0    conda-forge
urllib3                   1.22             py36h276f60a_0
vc                        14.1                 h0510ff6_3
vs2015_runtime            15.5.2                        3
wheel                     0.31.1                   py36_0
win_inet_pton             1.0.1            py36he67d7fd_1
wincertstore              0.2              py36h7fe50ca_0
yaml                      0.1.7                hc54c509_2
zlib                      1.2.11               h2fa13f4_3    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : base
    active env location : C:\Users\xxxxx\AppData\Local\Continuum\miniconda3
            shell level : 1
       user config file : D:\HOME\.condarc
 populated config files : D:\HOME\.condarc
          conda version : 4.5.8
    conda-build version : not installed
         python version : 3.6.5.final.0
       base environment : C:\Users\xxxxx\AppData\Local\Continuum\miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\xxxxx\AppData\Local\Continuum\miniconda3\pkgs
                          C:\Users\xxxxx\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\xxxxx\AppData\Local\Continuum\miniconda3\envs
                          C:\Users\xxxxx\AppData\Local\conda\conda\envs
                          D:\HOME\.conda\envs
               platform : win-64
             user-agent : conda/4.5.8 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.14393
          administrator : False
             netrc file : None
           offline mode : False
@mingwandroid
Copy link
Contributor

QtSide2 should follow the correct plugin loading logic. Please report this to them.

@mingwandroid
Copy link
Contributor

There are a litany of problems with what you are attempting to do that I have commented over at the Qt bug report. Also if Qt is attempting to load Python extension modules from the Qt plugins directory instead of site-packages then that's clearly a bug in how PySide2 operates.

qt.conf is the only way to 'correctly' relocate a Qt installation.

@giumas
Copy link
Author

giumas commented Jul 30, 2018

To clarify, my intent is to use both the official PySide2 wheel and the conda-forge Matplotlib package. But, Matplotlib triggers the installation of PyQt and Qt packages. This latter installation brakes PySide2.

What do you think is the best solution to this circular issue?

I believe that something similar was reported here: https://stackoverflow.com/questions/51367446/pyside2-application-failed-to-start

@jakirkham
Copy link
Member

So we do have pyside2 as a conda package, which you can install. Have you tried that?

@giumas
Copy link
Author

giumas commented Jul 30, 2018

I have used the pyside2 conda package in the past. The issue is that I need recent improvements in PySide2 that are only available in the 5.11 branch. They are not backported to the 5.9 branch.

@giumas
Copy link
Author

giumas commented Jul 30, 2018

Why doesn't conda uninstall qt remove the installed qt.conf file? I believe that it would solve my issue.

I can remove manually, but then other users may have the same issue.

@mingwandroid
Copy link
Contributor

Lack of removal is a bug and I'll fix it, but fundamentally this course of action (co-installation as you incorrectly term it for it is nothing of the sort, instead it's talking two incompatible software ecosystems, ramming them together and hoping for the best) is doomed to fail.

@giumas
Copy link
Author

giumas commented Jul 30, 2018

What would be the "two incompatible software ecosystems"? Did you mean the mixing of conda and pip?

@mingwandroid
Copy link
Contributor

mingwandroid commented Jul 30, 2018

When installing things involving compiled code pip and conda are mutually incompatible, unless you are lucky. You are never lucky with packages as large as qt. The odds are stacked against luck in the face of so much code. Please read up on binary compatibility.

@giumas
Copy link
Author

giumas commented Jul 30, 2018

I understand the issues with binary compatibility and that you have a lot of experience with the Anaconda ecosystem, but I thought that it was possible by (somehow) carefully wrapping the conda package.

In other words, does it mean that this @teoliphant's statement is not always valid?

@mingwandroid
Copy link
Contributor

In other words, does it mean that this @teoliphant's statement is not always valid?

Pure-python stuff works mostly well, anything else YMMV. I already explained why though, so I'm not sure why you are asking me to contradict Travis here?

@mingwandroid
Copy link
Contributor

I understand the issues with binary compatibility
..
but I thought that it was possible by (somehow) carefully wrapping the conda package.

It is not.

@giumas
Copy link
Author

giumas commented Jul 30, 2018

I understand the issues with binary compatibility
..
but I thought that it was possible by (somehow) carefully wrapping the conda package.

It is not.

Got it! Your statement is what I was actually looking for. I was not able to find nothing similar in the official Anaconda documentation, while there are a few contradictory statements on SO, Reddit and other similar sites.

@teoliphant
Copy link

teoliphant commented Jul 30, 2018 via email

@mingwandroid
Copy link
Contributor

Thanks @teoliphant, you have the depth of knowledge though! I wasn't sure when wheels came into existence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants