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

Install error on Fedora 36 #174

Closed
Barugon opened this issue Sep 6, 2022 · 6 comments
Closed

Install error on Fedora 36 #174

Barugon opened this issue Sep 6, 2022 · 6 comments

Comments

@Barugon
Copy link

Barugon commented Sep 6, 2022

Trying to install this on Fedora 36 and ran into a few snags in the pip install -r requirements.txt portion. I was able to resolve them (missing dependencies) up until this one:

Collecting attrdict3
  Using cached attrdict3-2.0.2-py2.py3-none-any.whl (10 kB)
Collecting build
  Using cached build-0.8.0-py3-none-any.whl (17 kB)
Requirement already satisfied: certifi in /home/barugon/displaycal_venv/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (2022.6.15)
Collecting dbus-python
  Using cached dbus-python-1.3.2.tar.gz (605 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting distro
  Using cached distro-1.7.0-py3-none-any.whl (20 kB)
Requirement already satisfied: numpy in /home/barugon/displaycal_venv/lib/python3.10/site-packages (from -r requirements.txt (line 6)) (1.23.2)
Requirement already satisfied: Pillow in /home/barugon/displaycal_venv/lib/python3.10/site-packages (from -r requirements.txt (line 7)) (9.2.0)
Collecting PyChromecast
  Using cached PyChromecast-12.1.4-py2.py3-none-any.whl (62 kB)
Collecting Send2Trash
  Using cached Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting wxPython>=4.1.1
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-vgd2g36j/wxpython_886aaa770dd84e8bb308c782c460011c/setup.py", line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
        File "/tmp/pip-install-vgd2g36j/wxpython_886aaa770dd84e8bb308c782c460011c/buildtools/config.py", line 30, in <module>
          from attrdict import AttrDict
        File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/attrdict/__init__.py", line 5, in <module>
          from attrdict.mapping import AttrMap
        File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/attrdict/mapping.py", line 4, in <module>
          from collections import Mapping
      ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@Barugon
Copy link
Author

Barugon commented Sep 7, 2022

OK, I got through this by changing from collections import ... to from collections.abc import ... in various places in ./displaycal_venv/lib64/python3.10/site-packages/attrdict.

@Barugon
Copy link
Author

Barugon commented Sep 7, 2022

Got it installed and now I get this:

XDG: [Errno 2] No translation file found for domain: 'xdg-user-dirs'
Acquired lock file: <DisplayCAL.main.AppLock object at 0x7f838f187310>
displaycal 3.9.8 2022-09-07T00:17:07Z
fedora 36  x86_64
Python 3.10.6 (main, Aug  2 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)]
Faulthandler 
Traceback (most recent call last):
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", line 549, in main
    _main(module, name, app_lock_file_name)
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", line 141, in _main
    from DisplayCAL.wxaddons import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxaddons.py", line 9, in <module>
    from DisplayCAL.wxfixes import wx, GenButton, PlateButton, get_dialogs
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxfixes.py", line 27, in <module>
    import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libwx_gtk3u_core-3.2.so.0: cannot open shared object file: No such file or directory
┌──────────────────────────────────────────────────────────────────────────────┐
│ Traceback (most recent call last):                                           │
│   File                                                                       │
│ "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", │
│ line 549, in main                                                            │
│     _main(module, name, app_lock_file_name)                                  │
│   File                                                                       │
│ "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", │
│ line 141, in _main                                                           │
│     from DisplayCAL.wxaddons import wx                                       │
│   File                                                                       │
│ "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxaddons.py", │
│ line 9, in <module>                                                          │
│     from DisplayCAL.wxfixes import wx, GenButton, PlateButton, get_dialogs   │
│   File                                                                       │
│ "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxfixes.py", │
│ line 27, in <module>                                                         │
│     import wx                                                                │
│   File                                                                       │
│ "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/__init__.py", │
│ line 17, in <module>                                                         │
│     from wx.core import *                                                    │
│   File                                                                       │
│ "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/core.py",   │
│ line 12, in <module>                                                         │
│     from ._core import *                                                     │
│ ImportError: libwx_gtk3u_core-3.2.so.0: cannot open shared object file: No   │
│ such file or directory                                                       │
└──────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", line 549, in main
    _main(module, name, app_lock_file_name)
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", line 141, in _main
    from DisplayCAL.wxaddons import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxaddons.py", line 9, in <module>
    from DisplayCAL.wxfixes import wx, GenButton, PlateButton, get_dialogs
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxfixes.py", line 27, in <module>
    import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libwx_gtk3u_core-3.2.so.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/debughelpers.py", line 77, in handle_error
    from DisplayCAL.wxaddons import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxaddons.py", line 9, in <module>
    from DisplayCAL.wxfixes import wx, GenButton, PlateButton, get_dialogs
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxfixes.py", line 27, in <module>
    import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/__init__.py", line 12, in <module>
    __version__ = wx.__version__.VERSION_STRING
AttributeError: partially initialized module 'wx' has no attribute '__version__' (most likely due to a circular import)
Warning: handle_error(): partially initialized module 'wx' has no attribute '__version__' (most likely due to a circular import)
Exiting displaycal

@Barugon
Copy link
Author

Barugon commented Sep 7, 2022

The current version of wxGTK3 in Fedora 36 is 3.0.5.

@p5k369
Copy link
Collaborator

p5k369 commented Sep 7, 2022

OK, I got through this by changing from collections import ... to from collections.abc import ... in various places in ./displaycal_venv/lib64/python3.10/site-packages/attrdict.

Hey @Barugon you should not need to change anything here. This is a third party module which should work fine with wxpython-4.2.0.

Traceback (most recent call last):
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", line 549, in main
    _main(module, name, app_lock_file_name)
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/main.py", line 141, in _main
    from DisplayCAL.wxaddons import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxaddons.py", line 9, in <module>
    from DisplayCAL.wxfixes import wx, GenButton, PlateButton, get_dialogs
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxfixes.py", line 27, in <module>
    import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: libwx_gtk3u_core-3.2.so.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/debughelpers.py", line 77, in handle_error
    from DisplayCAL.wxaddons import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxaddons.py", line 9, in <module>
    from DisplayCAL.wxfixes import wx, GenButton, PlateButton, get_dialogs
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/DisplayCAL/wxfixes.py", line 27, in <module>
    import wx
  File "/home/barugon/displaycal_venv/lib64/python3.10/site-packages/wx/__init__.py", line 12, in <module>
    __version__ = wx.__version__.VERSION_STRING
AttributeError: partially initialized module 'wx' has no attribute '__version__' (most likely due to a circular import)
Warning: handle_error(): partially initialized module 'wx' has no attribute '__version__' (most likely due to a circular import)
Exiting displaycal

I guess this comes from a not working wxPython install. You can try several things:

  • Maybe this can be resolved very simple by removing wxPython with pip and reinstalling it
  • This might be not enough and if you cant track down all your modifications you might need a new virtual environment
  • If you cant get it running and it is related to attrdict3 and wxpython-4.2.0 restrict wxpython version to wxPython==4.1.1 in requirements file. You will lose no functionality.

Tell us if you cant get it resolved, cheers.

edit:
forgot to mention: reinstall with --no-cache-dir

@eoyilmaz
Copy link
Owner

Hey @Barugon yeah I was going to say the things @p5k369 already mentioned, we should probably stick with wxPython 4.1.1 for a while.

@eoyilmaz
Copy link
Owner

Clsoing this as this is fixed somewhere along the line...

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

3 participants