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

ImportError with PyQt5.QtNetwork: undefined symbol: krb5_ser_context_init, version krb5_3_MIT #872

Open
prjemian opened this issue May 18, 2022 · 0 comments
Labels

Comments

@prjemian
Copy link
Collaborator

Describe the bug
Starting on Zorin Linux (Ubuntu 20.04 derivative), with new environment and get this error from the archiver_plugin.py file:

# (dev22) zorinvm@zorin22:~/.../slaclab/pydm$ pydm --hide-status-bar --hide-menu-bar --hide-nav-bar -m "P=gp:,M=m1" ~/motorxU.ui 
# [2022-05-18 12:45:38,148] [ERROR   ] - Unable to import plugin file archiver_plugin.py.This plugin will be skipped.The exception raised was: /lib/x86_64-linux-gnu/libgssapi_krb5.so.2: undefined symbol: krb5_ser_context_init, version krb5_3_MIT
# Traceback (most recent call last):
#   File "/home/zorinvm/Documents/projects/slaclab/pydm/pydm/data_plugins/__init__.py", line 148, in load_plugins_from_path
#     module = imp.load_source(temp_name,
#   File "/home/zorinvm/Apps/miniconda3/envs/dev22/lib/python3.10/imp.py", line 172, in load_source
#     module = _load(spec)
#   File "<frozen importlib._bootstrap>", line 719, in _load
#   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
#   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
#   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
#   File "/home/zorinvm/Documents/projects/slaclab/pydm/pydm/data_plugins/archiver_plugin.py", line 11, in <module>
#     from qtpy.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
#   File "/home/zorinvm/Apps/miniconda3/envs/dev22/lib/python3.10/site-packages/qtpy/QtNetwork.py", line 16, in <module>
#     from PyQt5.QtNetwork import *
# ImportError: /lib/x86_64-linux-gnu/libgssapi_krb5.so.2: undefined symbol: krb5_ser_context_init, version krb5_3_MIT

Since I'm trying to test the new PYDMAbsoluteGeometry widget, I've been experimenting with pyqt and qt versions, looking for something that works (internal widgets scale with window resize event) with the new feature in both designer and the pydm application.

Expected behavior
Widget scaling should work (it does not work now but it did work in designer before I started experimenting with the environment).

Steps to Reproduce

Create a custom conda environment: mamba env create --force -f ./environment.yml

# file: environment.yml
# create conda environment for developing pydm and adl2pydm

# hint: use mamba instead of conda, its solver is faster

# command:    mamba env create --force -f ./environment.yml

name: dev22

channels:
  - defaults
  - conda-forge

dependencies:
  - python =3
  - black
  - flake8
  - ipython
  - mamba
  - pip

  # This gets Qt 5.9.7
  - qt
  - pyqt5

  - pip:
    # - pyqt5 >=5.15
    # get Qt designer application
    # --- no success !
    # dead-ends
    # - pyqt5-tools
    # - pyqt5-plugins
    # - pyqt5designer
    # - qt5-applications
    # - pyqt5-sip

    # requirements.txt
    - numpy>=1.11.0
    - pyepics>=3.2.7
    - pyqtgraph>=0.12.0
    - qtpy
    - requests>=1.1.0
    - scipy>=0.12.0
    - six

    # dev-requirements.txt
    - codecov
    - pytest>=3.6
    - pytest-qt
    - pytest-cov
    - pytest-timeout

Then

conda activate dev22
cd slaclab/pydm
pip install -e .

Finally, test with this motorX.ui screen file:
motorxU.ui.txt

Possible Solution

This problem looks like a conflict created upstream and we may not need the krb5 feature that is missing. Others have encountered this problem and come to this conclusion.

My Platform

(dev22) zorinvm@zorin22:~/.../slaclab/pydm$ uname -a
Linux zorin22 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
(dev22) zorinvm@zorin22:~/.../slaclab/pydm$ conda list
# packages in environment at /home/zorinvm/Apps/miniconda3/envs/dev22:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
appdirs                   1.4.4              pyhd3eb1b0_0  
asttokens                 2.0.5              pyhd3eb1b0_0  
attrs                     21.4.0             pyhd3eb1b0_0  
backcall                  0.2.0              pyhd3eb1b0_0  
black                     19.10b0                    py_0  
brotlipy                  0.7.0           py310h7f8727e_1002  
bzip2                     1.0.8                h7b6447c_0  
c-ares                    1.18.1               h7f8727e_0  
ca-certificates           2022.4.26            h06a4308_0  
certifi                   2021.5.30       py310h06a4308_0  
cffi                      1.15.0          py310hd667e15_1  
charset-normalizer        2.0.4              pyhd3eb1b0_0  
click                     8.0.4           py310h06a4308_0  
codecov                   2.1.12                   pypi_0    pypi
conda                     4.12.0          py310h06a4308_0  
conda-package-handling    1.8.1           py310h7f8727e_0  
coverage                  6.3.3                    pypi_0    pypi
cryptography              37.0.1          py310h9ce1e76_0  
dbus                      1.13.18              hb2f20db_0  
decorator                 5.1.1              pyhd3eb1b0_0  
executing                 0.8.3              pyhd3eb1b0_0  
expat                     2.4.4                h295c915_0  
flake8                    4.0.1              pyhd3eb1b0_1  
fontconfig                2.13.1               h6c09931_0  
freetype                  2.11.0               h70c0345_0  
glib                      2.69.1               h4ff587b_1  
gst-plugins-base          1.14.0               h8213a91_2  
gstreamer                 1.14.0               h28cd5cc_2  
icu                       58.2                 he6710b0_3  
idna                      3.3                pyhd3eb1b0_0  
importlib-metadata        4.11.3          py310h06a4308_0  
iniconfig                 1.1.1                    pypi_0    pypi
ipython                   8.3.0           py310h06a4308_0  
jedi                      0.18.1          py310h06a4308_1  
jpeg                      9e                   h7f8727e_0  
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.19.3               h3790be6_0    conda-forge
ld_impl_linux-64          2.38                 h1181459_0  
libarchive                3.5.2                hccf745f_1    conda-forge
libcurl                   7.83.1               h7bff187_0    conda-forge
libedit                   3.1.20210910         h7f8727e_0  
libev                     4.33                 h7f8727e_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 11.2.0               h1234567_0  
libgomp                   11.2.0               h1234567_0  
libiconv                  1.16                 h7f8727e_2  
libmamba                  0.23.1               hd8a31e3_1    conda-forge
libmambapy                0.23.1          py310hab0e683_1    conda-forge
libnghttp2                1.47.0               h727a467_0    conda-forge
libpng                    1.6.37               hbc83047_0  
libsolv                   0.7.22               h6239696_0    conda-forge
libssh2                   1.10.0               h8f2d780_0  
libstdcxx-ng              11.2.0               h1234567_0  
libuuid                   1.0.3                h7f8727e_2  
libxcb                    1.15                 h7f8727e_0  
libxml2                   2.9.12               h03d6c58_0  
libzlib                   1.2.11            h166bdaf_1014    conda-forge
lz4-c                     1.9.3                h295c915_1  
lzo                       2.10                 h7b6447c_2  
mamba                     0.23.1          py310hf87f941_1    conda-forge
matplotlib-inline         0.1.2              pyhd3eb1b0_2  
mccabe                    0.7.0              pyhd3eb1b0_0  
mypy_extensions           0.4.3           py310h06a4308_0  
ncurses                   6.3                  h7f8727e_2  
numpy                     1.22.3                   pypi_0    pypi
openssl                   1.1.1o               h7f8727e_0  
packaging                 21.3                     pypi_0    pypi
parso                     0.8.3              pyhd3eb1b0_0  
pathspec                  0.7.0                      py_0  
pcre                      8.45                 h295c915_0  
pexpect                   4.8.0              pyhd3eb1b0_3  
pickleshare               0.7.5           pyhd3eb1b0_1003  
pip                       21.2.4          py310h06a4308_0  
pluggy                    1.0.0                    pypi_0    pypi
prompt-toolkit            3.0.20             pyhd3eb1b0_0  
ptyprocess                0.7.0              pyhd3eb1b0_2  
pure_eval                 0.2.2              pyhd3eb1b0_0  
py                        1.11.0                   pypi_0    pypi
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycodestyle               2.8.0              pyhd3eb1b0_0  
pycosat                   0.6.3           py310h7f8727e_0  
pycparser                 2.21               pyhd3eb1b0_0  
pydm                      1.15.1+58.g79d19195           dev_0    <develop>
pyepics                   3.5.1                    pypi_0    pypi
pyflakes                  2.4.0              pyhd3eb1b0_0  
pygments                  2.11.2             pyhd3eb1b0_0  
pyopenssl                 22.0.0             pyhd3eb1b0_0  
pyparsing                 3.0.9                    pypi_0    pypi
pyqt5                     5.15.6                   pypi_0    pypi
pyqt5-qt5                 5.15.2                   pypi_0    pypi
pyqt5-sip                 12.10.1                  pypi_0    pypi
pyqtgraph                 0.12.4                   pypi_0    pypi
pysocks                   1.7.1           py310h06a4308_0  
pytest                    7.1.2                    pypi_0    pypi
pytest-cov                3.0.0                    pypi_0    pypi
pytest-qt                 4.0.2                    pypi_0    pypi
pytest-timeout            2.1.0                    pypi_0    pypi
python                    3.10.4               h12debd9_0  
python_abi                3.10                    2_cp310    conda-forge
qt                        5.9.7                h5867ecd_1  
qtpy                      2.1.0                    pypi_0    pypi
readline                  8.1.2                h7f8727e_1  
regex                     2022.3.15       py310h7f8727e_0  
reproc                    14.2.4               h295c915_1  
reproc-cpp                14.2.4               h295c915_1  
requests                  2.27.1             pyhd3eb1b0_0  
ruamel_yaml               0.15.100        py310h7f8727e_0  
scipy                     1.8.1                    pypi_0    pypi
setuptools                61.2.0          py310h06a4308_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.38.2               hc218d9a_0  
stack_data                0.2.0              pyhd3eb1b0_0  
tk                        8.6.11               h1ccaba5_0  
toml                      0.10.2             pyhd3eb1b0_0  
tomli                     2.0.1                    pypi_0    pypi
tqdm                      4.64.0          py310h06a4308_0  
traitlets                 5.1.1              pyhd3eb1b0_0  
typed-ast                 1.4.3           py310h7f8727e_1  
typing_extensions         4.1.1              pyh06a4308_0  
tzdata                    2022a                hda174b7_0  
urllib3                   1.26.9          py310h06a4308_0  
wcwidth                   0.2.5              pyhd3eb1b0_0  
wheel                     0.37.1             pyhd3eb1b0_0  
xz                        5.2.5                h7f8727e_1  
yaml                      0.2.5                h7b6447c_0  
yaml-cpp                  0.6.3                he1b5a44_4    conda-forge
zipp                      3.8.0           py310h06a4308_0  
zlib                      1.2.11            h166bdaf_1014    conda-forge
zstd                      1.5.0                ha4553b6_1  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant