Skip to content

Error installing on Ubuntu #268

@gbrookshire

Description

@gbrookshire

** I eventually got this working. I've left these comments for anyone who runs into the same errors I did. **

I tried installing following the instructions here:
https://jonescompneurolab.github.io/hnn/installer/ubuntu/

Initially bash hnn-ubuntu.sh crashed because of problems with unrelated PPAs. I fixed those issues and the ran the script again, and it successfully downloaded the directory hnn_source_code/.

When I try to run HNN, I get this error:

$ python hnn.py                                                                            (hnn) 
Traceback (most recent call last):
  File "hnn.py", line 10, in <module>
    from hnn_qt5 import *
  File "/home/geoff/Downloads/hnn_source_code/hnn_qt5.py", line 4, in <module>
    from PyQt5.QtWidgets import QMainWindow, QAction, qApp, QApplication, QToolTip, QPushButton, QFormLayout
ImportError: No module named PyQt5.QtWidgets

When I try to install PyQt5, I get a message saying it's already installed.

$ pip install PyQt5                                                                        (hnn) 
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PyQt5 in /home/geoff/.local/lib/python3.6/site-packages (5.15.2)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /home/geoff/.local/lib/python3.6/site-packages (from PyQt5) (12.8.1)

Directly importing PyQT in python works fine:

$ python                                                                                   (hnn) 
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5
>>> 

I tried uninstalling and reinstalling PyQt like this:

pip uninstall PyQt5
pip uninstall pyqtwebengine
pip install PyQt5==5.12.1 pyqtwebengine==5.12.1

And now I'm getting this error:

$ python hnn.py                                                                            (hnn) 
Traceback (most recent call last):
  File "hnn.py", line 10, in <module>
    from hnn_qt5 import *
  File "/home/geoff/Downloads/hnn_source_code/hnn_qt5.py", line 4, in <module>
    from PyQt5.QtWidgets import QMainWindow, QAction, qApp, QApplication, QToolTip, QPushButton, QFormLayout
ImportError: /home/geoff/.local/lib/python3.6/site-packages/PyQt5/QtWidgets.so: undefined symbol: _Py_Dealloc

I was using the fish shell for this. When I uninstall everything and try again in a bash shell, it hangs for a few minutes and then installs and gives this error:

$ python3 hnn.py 
Traceback (most recent call last):
  File "hnn.py", line 10, in <module>
    from hnn_qt5 import *
  File "/home/geoff/Downloads/hnn_source_code/hnn_qt5.py", line 29, in <module>
    import nlopt
ModuleNotFoundError: No module named 'nlopt'

After running pip install nlopt, it's working! For anyone who runs into the same problems in the future, here are the steps I used to get HNN working in Ubuntu 18.04:

  • Delete any PPAs that throw warnings or errors.
  • Use bash instead of another shell (which is surprising since the installation script is explicitly called with bash)
  • Manually run pip install nlopt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions