flika-org / flika

An interactive image processing program for biologists written in Python.
http://flika-org.github.io/
MIT License
22 stars 1 forks source link

pyside?? pyside2?? impossible situation? #47

Closed hjmangalam closed 4 years ago

hjmangalam commented 5 years ago

on a CentOS cluster,trying to install for a user. Using anaconda/3.6-5.0.1 as a base, all deps installed (see http://termbin.com/fric ) except for pyside, which is no longer available for versions > 3.4.:

pip install flika
...
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)] 
...

And pyside2 is not integrated into flika. What do you recommend for resolving this impasse?

When trying to start flika with the above deps installed (tho not pyside; apparently not a stated dep):

$ flika
2018-11-05 20:52:15,545 - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/data/apps/anaconda/3.6-5.0.1/lib/python3.6/site-packages/qtpy/__init__.py", line 148, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/apps/anaconda/3.6-5.0.1/bin/flika", line 7, in <module>
    from flika.flika import exec_
  File "/data/apps/anaconda/3.6-5.0.1/lib/python3.6/site-packages/flika/__init__.py", line 4, in <module>
    from .flika import start_flika
  File "/data/apps/anaconda/3.6-5.0.1/lib/python3.6/site-packages/flika/flika.py", line 12, in <module>
    from .app.application import FlikaApplication
  File "/data/apps/anaconda/3.6-5.0.1/lib/python3.6/site-packages/flika/app/application.py", line 9, in <module>
    from qtpy import QtCore, QtWidgets, QtGui
  File "/data/apps/anaconda/3.6-5.0.1/lib/python3.6/site-packages/qtpy/__init__.py", line 154, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

The pyqt is yet another problem, but I haven't started in on that. Waiting to see if the pyside bit is addressable.

thanks Harry

kyleellefsen commented 5 years ago

I'm struggling to replicate this. I just did a clean install of flika in a new conda environment using conda version 4.5.11 on OSX, python=3.6.7. PySide shouldn't be required, I've never used it. qtpy should be able to work with the PyQt5 you have installed (my clean install shows PyQt5=5.11.3). It seems that for some reason your qtpy isn't detecting PyQt5, and is throwing the error that PySide can't be found.

feoktistai commented 5 years ago

I had a similar problem. I've zero python experience so I'm not even sure what I'm doing but I followed the instructions by installing the latest version of anaconda from the link on the flika website, running the pip install flika command in my terminal and then trying to run flika and I get this same error

2019-07-17 14:28:08,078 - ERROR - Uncaught exception Traceback (most recent call last): File "/anaconda3/lib/python3.7/site-packages/qtpy/init.py", line 202, in from PySide import version as PYSIDE_VERSION # analysis:ignore ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/anaconda3/bin/flika", line 6, in from flika.flika import exec_ File "/anaconda3/lib/python3.7/site-packages/flika/init.py", line 4, in from .flika import start_flika File "/anaconda3/lib/python3.7/site-packages/flika/flika.py", line 12, in from .app.application import FlikaApplication File "/anaconda3/lib/python3.7/site-packages/flika/app/application.py", line 9, in from qtpy import QtCore, QtWidgets, QtGui File "/anaconda3/lib/python3.7/site-packages/qtpy/init.py", line 208, in raise PythonQtError('No Qt bindings could be found') qtpy.PythonQtError: No Qt bindings could be found

????????

kyleellefsen commented 5 years ago

What operating system are you using?

Try installing PyQt5 from the terminal with the command: pip install PyQt5

It should have automatically been installed with flika, but maybe for some reason it wasn't. Let me know if that works.

feoktistai commented 5 years ago

I installed PyQt5 it and am still getting the error message. Also my anaconda navigator application isn't launching (though it did launch after I first installed it). I read in python forums that this might be a problem with the qt bindings. (Again I'm very very new to python so I'm only guessing from what I've read up on that the qt bindings are important for launching GUIs). I'm running OS X version 10.11.6. I'm planning on upgrading the OS since the latest release of MATLAB requires the new version. Please let me know if any of this strikes you as relevant to the problem.

Just to update: the operating system was the issue. I updated to the latest OS X release (10.14.5) and Flika launches just fine. Thanks for your time!

kyleellefsen commented 5 years ago

I'm not sure if it's relevant, I thought it might be a Linux thing, but I'm using OS X 10.14.4 and it works for me.

I'm suspecting it's a package versioning issue. Could you type the following command to see which version of qt, pyqt, and qtpy you are using in a terminal and paste the results here:

pip freeze | grep -i qt

You can try forcing them to be the same as the versions I'm using: pip install --force-reinstall qtpy==1.8.0 PyQt5==5.13

Then launch a python terminal and run >>> import qtpy

Does that give an error?

feoktistai commented 5 years ago

This is what it it says for versions:

PyQt5-sip==4.19.18 pyqtgraph==0.10.0 pyrsistent==0.14.11

-- QtAwesome==0.5.7 qtconsole==4.4.3 QtPy==1.7.0

Again, once I upgraded my OS to 10.14, I'm able to launch FLIKA, so the above is a PyQt version that now works.

kyleellefsen commented 5 years ago

Great, didn't see that the first time. Glad it works!