Python no module sip

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

qtconsole does not work with pyqt5 5.11 («ModuleNotFoundError: No module named ‘sip'») #291

qtconsole does not work with pyqt5 5.11 («ModuleNotFoundError: No module named ‘sip'») #291

Comments

On a fresh windows machine with python 3.7.0, after installing the following:

pip install ipython notebook qtconsole pyqt5 

Running ipython qtconsole opens an Error startin QtConsole dialog with the following error:

--------------------------- Error starting QtConsole --------------------------- Traceback (most recent call last): File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\IEUser\AppData\Local\Programs\Python\Python37-32\Scripts\ipython.exe\__main__.py", line 9, in sys.exit(start_ipython()) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\IPython\__init__.py", line 125, in start_ipython return launch_new_instance(argv=argv, **kwargs) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\IPython\terminal\ipapp.py", line 308, in initialize super(TerminalIPythonApp, self).initialize(argv) File "", line 2, in initialize File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\IPython\core\application.py", line 450, in initialize self.parse_command_line(argv) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\IPython\terminal\ipapp.py", line 303, in parse_command_line return super(TerminalIPythonApp, self).parse_command_line(argv) File "", line 2, in parse_command_line File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 514, in parse_command_line return self.initialize_subcommand(subc, subargv) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\IPython\core\application.py", line 243, in initialize_subcommand return super(BaseIPythonApplication, self).initialize_subcommand(subc, argv) File "", line 2, in initialize_subcommand File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\traitlets\config\application.py", line 445, in initialize_subcommand subapp = import_item(subapp) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\ipython_genutils\importstring.py", line 31, in import_item module = __import__(package, fromlist=[obj]) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\qtconsole\qtconsoleapp.py", line 60, in from qtconsole.qt import QtCore, QtGui File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\qtconsole\qt.py", line 23, in QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts) File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\qtconsole\qt_loaders.py", line 365, in load_qt result = loaders[api]() File "c:\users\ieuser\appdata\local\programs\python\python37-32\lib\site-packages\qtconsole\qt_loaders.py", line 270, in import_pyqt5 import sip ModuleNotFoundError: No module named 'sip' 

The same error will appear if trying to run the command:

Читайте также:  Путь сохранения файла java

from a python shell, however the following works OK:

Источник

Importerror no module named sip : Tricks to Handle

importerror_ missing required dependencies [

We can fix ” importerror no module named sip” error by installing PyQt5 python module. We should always ensure the path for PyQt5 python module. In this article, We will see how to install PyQt5 in different ways step by step.

Importerror no module named sip ( Methods to Fix ) –

As we always choose pip for installing any python package. So In the same way, our first approach would be to install the PyQt5 using pip. After it, We will see how to use conda manager for installing PyQt5 module.

Method 1: Using pip –

Here is the command for installing the PyQt5 package using pip.

PyQt5 is a python utility for Qt GUI. It’s also a cross-platform library.

There is a commercial version for PyQt5 module. In case, If you are building any commercial application then use the below command.

Qt is very much useful in developing mobile applications and Desktop based applications.

Method 2 :

We can use Conda package manager for installing the PyQt5 module. This is the less common way for installing but still popular. Especially for Commercial projects with Official Anaconda. Anyways here is the command for installing using CONDA manager.

I hope these two methods are helpful for you in resolving this bug for you. If you have tried these methods but still facing the same error, please let our team know about it. We also request you to share some findings on the same issue if it is unique. You may comment the same in the comment box. It would also be fine if you write those details in an email. We will update the same relevant information solution in the current article to make it more useful for the readers. We keep on writing similar articles on these common bugs.

Data Science Learner Team

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

We respect your privacy and take protecting it seriously

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

No module named ‘PyQt5.sip’ #892

No module named ‘PyQt5.sip’ #892

Comments

I tried following the directions in the README to build Electron Cash from source on a Ubuntu 18.04 VM. This was a new system, setup for experimenting with software.

When I got to the part where I run pyrcc5 icons.qrc -o gui/qt/icons_rc.py , I got this output:

trout@trout-wasabi:~/Electron-Cash$ pyrcc5 icons.qrc -o gui/qt/icons_rc.py Traceback (most recent call last): File "/usr/local/bin/pyrcc5", line 11, in load_entry_point('PyQt5==5.11.3', 'console_scripts', 'pyrcc5')() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2693, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/local/lib/python3.6/dist-packages/PyQt5-5.11.3-py3.6-linux-x86_64.egg/PyQt5/pyrcc_main.py", line 21, in from PyQt5.QtCore import PYQT_VERSION_STR, QDir, QFile ModuleNotFoundError: No module named 'PyQt5.sip' 

The text was updated successfully, but these errors were encountered:

pip uninstall pyqt5 pip install --upgrade pyqt5 

After checking for the required dependencies using

pip3 install —user —upgrade PyQt5
pip3 install —user —upgrade PyQt5-sip

I still encounter the following error referencing a missing module named PyQt5.sip

electron-cash:91: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses
import imp
[ecc] info: libsecp256k1 library not available, falling back to python-ecdsa. This means signing operations will be slower.
Traceback (most recent call last):
File «electron-cash», line 378, in
d.init_gui(config, plugins)
File «/usr/local/opt/Electron Cash-3.3.4/lib/daemon.py», line 303, in init_gui
gui = import(‘electroncash_gui.’ + gui_name, fromlist=[‘electroncash_gui’])
File «/usr/local/opt/Electron Cash-3.3.4/gui/qt/init.py», line 33, in
from PyQt5.QtGui import *
ModuleNotFoundError: No module named ‘PyQt5.sip’

Does someone with more knowledge in this area know how pyinstaller/pyinstaller#3630 (comment) applies to this issue with electron cash?

PyQt5.QtGui import * seems to be calling for SIP in some deprecated manner due to SIP no longer being bundled with PyQt5.

I am not able to open any version of electron-cash and cannot access my wallets so this is an urgent issue.

pip3 install --user -I PyQt5 pip3 install --user -I PyQt5-sip 

-I tells it to ignore already-installed packages and reinstall them.

PyQt5.QtGui import * seems to be calling for SIP in some deprecated manner due to SIP no longer being bundled with PyQt5.

No.. to the contrary — sip is bundled with PyQt5 as sip.so.

Also try the thing clifordsymack suggested:

pip uninstall pyqt5 pip install --upgrade pyqt5 

No.. to the contrary — sip is bundled with PyQt5 as sip.so.

I’d already tried clifordsymack’s suggestion to no success. However, your tip about using -I seemed to work. Thanks a lot!

Dud PyQt5 release that should be fixed in next one if I understand correctly.

I had this issue; the chat that led to the resolution of the issue is below. It looks like having python3-pyqt5 installed via apt was the problem, and so uninstalling it via apt («sudo apt remove python3-pyqt5») and then installing it with «pip3 install —user -I PyQt5» solved the problem. I’m including everything below just for reference and so that if anyone searches the same errors they can find this page.

Источник

Оцените статью