Chilipp / straditize

⛔️ Python package for digitizing pollen diagrams
https://straditize.readthedocs.io
GNU General Public License v3.0
14 stars 5 forks source link

Installation with pip and Qt #1

Closed ixjlyons closed 5 years ago

ixjlyons commented 5 years ago

Hello, here from the JOSS review openjournals/joss-reviews#1216

Problem description

Following the docs on installation in a new virtual environment, I found that just running pip install straditize wasn't enough to get the application running. Since nothing upstream seems to require a PyQt package, it has to be installed separately.

PyQt is also not mentioned on the installation page as a dependency because it's more properly a dependency of psyplot-gui, so that make sense.

I think at least it should be mentioned on the page that you need PyQt4 or PyQt5 installed and it won't be installed for you.

I understand some of the frustrating things about Qt and Python -- when Riverbank started building and releasing PyQt5 wheels with Qt bundled on PyPI, I just decided I'd make my application strictly dependent on PyQt5 and make life easier. :) If users don't have a preference on 4 vs. 5, just suggesting pip install pyqt5 would be helpful.

Also, if you haven't seen it before, qtpy may be worth looking at.

Environment information

Arch Linux Python 3.7.2 (system package) pip 18.1

Created a new virtual environment (python -m venv .venv), then ran pip install straditize. Here's what I get when trying to run it:

(.venv) $ straditize
Traceback (most recent call last):
  File "/home/kenny/tmp/.venv/lib/python3.7/site-packages/psyplot_gui/compat/qtcompat.py", line 13, in <module>
    import PyQt5
ModuleNotFoundError: No module named 'PyQt5'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kenny/tmp/.venv/bin/straditize", line 11, in <module>
    load_entry_point('straditize==0.1.0', 'console_scripts', 'straditize')()
  File "/home/kenny/tmp/.venv/lib/python3.7/site-packages/straditize/__main__.py", line 177, in main
    parser.parse_known2func()
  File "/home/kenny/tmp/.venv/lib/python3.7/site-packages/funcargparse/__init__.py", line 924, in parse_known2func
    return func(**kws), remainder
  File "/home/kenny/tmp/.venv/lib/python3.7/site-packages/straditize/__main__.py", line 64, in start_app
    from psyplot_gui.compat.qtcompat import QApplication
  File "/home/kenny/tmp/.venv/lib/python3.7/site-packages/psyplot_gui/compat/qtcompat.py", line 15, in <module>
    from PyQt4.QtGui import (
ModuleNotFoundError: No module named 'PyQt4'
Chilipp commented 5 years ago

Dear @ixjlyons. I'm finally coming back to you. I implemented the changes in the pip-install-fix branch (see https://github.com/Chilipp/straditize/pull/6/). Could you please check out this branch (git checkout pip-install-fix) and run your installation commands again?

ixjlyons commented 5 years ago

I'm not sure if you get an email notification when a PR is reviewed, but this and the other two issues I opened look like they're resolved once the corresponding PRs are merged.

Chilipp commented 5 years ago

I'm not sure if you get an email notification when a PR is reviewed

I got a notification. Thank you :)

Chilipp commented 5 years ago

Closed by https://github.com/Chilipp/straditize/pull/6