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

Incompatabilities between PySide6 and colormaps #8

Closed
wxguy opened this issue Mar 6, 2023 · 7 comments
Closed

Incompatabilities between PySide6 and colormaps #8

wxguy opened this issue Mar 6, 2023 · 7 comments

Comments

@wxguy
Copy link

wxguy commented Mar 6, 2023

I have a script that uses both GUI and the command line. When I use the script to be used as only the command line, it works without an issue. However, when invoking GUI which is based on PySide6, it produces the following error.

import colormaps as cmaps
  File "shibokensupport/signature/loader.py", line 61, in feature_imported
  File "shibokensupport/feature.py", line 135, in feature_imported
AttributeError: 'Cmaps' object has no attribute '__name__'

Not able to figure out what went wrong. Can you please help me out on this...

@pratiman-91
Copy link
Owner

@wxguy
I am not aware of this script that you are using.

@wxguy
Copy link
Author

wxguy commented Jul 10, 2023

In continuation of the above conversation, this is what I get when I install the colormaps package with pip:

pip install colormaps
WARNING: Skipping /home/sundar/miniconda/envs/test/lib/python3.11/site-packages/PySide6-6.5.1.dist-info due to invalid metadata entry 'name'
WARNING: Skipping /home/sundar/miniconda/envs/test/lib/python3.11/site-packages/shiboken6-6.5.1.dist-info due to invalid metadata entry 'name'
.
.
.
WARNING: Skipping /home/sundar/miniconda/envs/test/lib/python3.11/site-packages/PySide6-6.5.1.dist-info due to invalid metadata entry 'name'
WARNING: Skipping /home/sundar/miniconda/envs/test/lib/python3.11/site-packages/shiboken6-6.5.1.dist-info due to invalid metadata entry 'name'
Installing collected packages: colormaps
WARNING: Skipping /home/sundar/miniconda/envs/test/lib/python3.11/site-packages/PySide6-6.5.1.dist-info due to invalid metadata entry 'name'
WARNING: Skipping /home/sundar/miniconda/envs/test/lib/python3.11/site-packages/shiboken6-6.5.1.dist-info due to invalid metadata entry 'name'
Successfully installed colormaps-0.4.0

This may be useful for debugging purposes. I did a pip install within the conda environment.

@pratiman-91
Copy link
Owner

@wxguy I am still unable to replicate your problem. I suggest you create a new environment using conda and install only PySide6 and then colormaps using pip. And if there is a problem then report it back. I can look into it.

@wxguy
Copy link
Author

wxguy commented Jul 19, 2023

@wxguy I am still unable to replicate your problem. I suggest you create a new environment using conda and install only PySide6 and then colormaps using pip. And if there is a problem then report it back. I can look into it.

This is what I exactly did so. Will forward my environment file shortly. Suggest you to include your package as part of conda distribution. Since you already has pypi, I am sure that it won't take much time.

@wxguy
Copy link
Author

wxguy commented Jul 19, 2023

Here is the content of my environment.yml file:-

# conda env create -f environment.yml  # Create env
# conda env remove -n cmap_test  # Remove env
name: cmap_test
channels:
  - conda-forge
dependencies:
  - python=3.11  
  - conda-forge::libpython-static 
  - conda-forge::wrf-python
  - conda-forge::netcdf4
  - conda-forge::cartopy
  - conda-forge::imageio
  - conda-forge::nuitka
  - conda-forge::ordered-set
  - conda-forge::wrapt
  - conda-forge::patchelf
  - conda-forge::pip
  - conda-forge::metpy
  - conda-forge::pyside6
  - conda-forge::h5py
  - conda-forge::psutil
  - conda-forge::py-cpuinfo
  - conda-forge::distro
  - conda-forge::requests
  - conda-forge::f90nml
  - conda-forge::qtawesome
  - conda-forge::loguru
  - pip:
    - pyinstaller
    - pyqtdarktheme
    - constants

Once env is installed and activated using conda activate cmap_test, I did:-

pip install colormaps

Hopefully, you can reproduce the error on your side.

@pratiman-91
Copy link
Owner

@wxguy Thank you for the environment.yml file. I am able to reproduce the warnings. It seems like it is not a colormaps problem but rather strict standards of pip itself. As these are mere warnings you can ignore these. I am working on the workflow for conda-forge and it should be available in the upcoming weeks.

Or if you want to avoid these warnings you can install PySide6 using pip install PySide6.

For more information: https://stackoverflow.com/questions/67074684/pip-has-problems-with-metadata and https://gist.github.com/MuhsinFatih/ee0154199803babb449b5bb98d3475f7?permalink_comment_id=4376984.

@pratiman-91
Copy link
Owner

I am closing this is not related to the package.

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

2 participants