I had an import error that i have long cleared but nbdev_build_docs is stuck on that line. When I search through the project folder the line is not found
The error is:
from nbdev.showdoc import show_doc
from pyintegrators.twitter import *
------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-f63d9caafaed> in <module>
1 from nbdev.showdoc import show_doc
----> 2 from pyintegrators.twitter import *
ModuleNotFoundError: No module named 'pyintegrators.twitter'
ModuleNotFoundError: No module named 'pyintegrators.twitter'
Yet when I search the project directory for that error i get No results found
It looks like I am dealing with a cache. How do I make it forget?
I am using macOs
Related
Pexpect serial https://pypi.org/project/pexpect-serial/ throwing an exception while running example. This in on windows. How do I fix?
import serial
from pexpect_serial import SerialSpawn
Traceback (most recent call last):
File "", line 1, in
File "C:\python36\lib\site-packages\pexpect_serial_init_.py", line 1, in
from .serial_spawn import SerialSpawn
File "C:\python36\lib\site-packages\pexpect_serial\serial_spawn.py", line 24, in
from pexpect import spawn
ImportError: cannot import name 'spawn'
found an alternative project that works on windows
pexpect-serial-terminal
I was running some model in jupyter notebook, but my computer crashed all of a sudden. Once I restarted my computer, I was not able to import numpy in my jupyter notebook, and got the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~\miniconda3\envs\fraud_detection\lib\site-packages\numpy\core\__init__.py in <module>
21 try:
---> 22 from . import multiarray
23 except ImportError as exc:
~\miniconda3\envs\fraud_detection\lib\site-packages\numpy\core\multiarray.py in <module>
11
---> 12 from . import overrides
13 from . import _multiarray_umath
~\miniconda3\envs\fraud_detection\lib\site-packages\numpy\core\overrides.py in <module>
6
----> 7 from numpy.core._multiarray_umath import (
8 add_docstring, implement_array_function, _get_implementing_args)
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-1-d4cdadb62aa7> in <module>
----> 1 import numpy
~\miniconda3\envs\fraud_detection\lib\site-packages\numpy\__init__.py in <module>
138 from . import _distributor_init
139
--> 140 from . import core
141 from .core import *
142 from . import compat
~\miniconda3\envs\fraud_detection\lib\site-packages\numpy\core\__init__.py in <module>
46 """ % (sys.version_info[0], sys.version_info[1], sys.executable,
47 __version__, exc)
---> 48 raise ImportError(msg)
49 finally:
50 for envkey in env_added:
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.8 from "C:\Users\miniconda3\envs\fraud_detection\python.exe"
* The NumPy version is: "1.19.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.
I tried deleting the whole anaconda and jupyter notebook, but it still did not work. Oddly, when I launched python in conda command shell I could successfully import numpy. Your help is much appreciated!!
When I try to run CADRE plug-in it fails when trying to import 'MBI' module in 'CADRE.power' discipline:
Traceback (most recent call last):
File "C:\Users\Laurynas\CADRE\src\mppt.py", line 9, in <module>
from CADRE.power import Power_SolarPower, Power_CellVoltage
File "C:\Users\Laurynas\CADRE\src\CADRE\power.py", line 10, in <module>
from MBI import MBI
ModuleNotFoundError: No module named 'MBI'
Is this some kind of legacy python or OpenMDAO module? I was not able to find it in the web.
Yeah, MBI is a separate package, but you can find it here:
https://github.com/OpenMDAO/MBI
In summary: as far as I recall, after conda-installing fenics and sfepy (along with, through pip, some dependencies), I cannot run spyder:
$ spyder
Traceback (most recent call last):
File "/home/charles/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: No module named 'PyQt5.QtWebEngineWidgets'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/charles/anaconda3/bin/spyder", line 6, in
sys.exit(spyder.app.start.main())
File "/home/charles/anaconda3/lib/python3.5/site-packages/spyder/app/start.py", line 103, in main
from spyder.app import mainwindow
File "/home/charles/anaconda3/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 92, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/charles/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5: version `Qt_5' not found (required by /home/charles/anaconda3/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so)
Along the method of
https://www.scivision.co/fix-spyder-cxxabi-not-found-qt-error/
Would it be a terrible idea to simply copy
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
to
~/anaconda3/lib/
a la
cp /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 ~/anaconda3/lib/
?
I'm paranoid about breaking something, is there a high probability of that happening?
Surely there's a better way to do this, no?
Thanks!
I've installed Qt5.2.1 / SIP 4.5.15 and PyQt5 on my Ubuntu 12.4 desktop. Everything seemed OK until I try to import QtWebKitWidgets. This module is very important in my code.
>>> from PyQt5 import QtWebkitWidgets
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name QtWebkitItems
>>>
No error raised during the installation phase. in my /opt/Qt5.2.1/5.2.1/gcc_64/lib directory I can see the corresponding Qt libs.
Does anyone have an idea ?
Thank you in advance
I'm not sure where you're getting "QtWebkitItems" from (a web-search gets no hits other than this page), but the real problem is a simple typo. The import statement should be:
from PyQt5 import QtWebKitWidgets # upper-case K!
PS: it's nicely ironic that you managed to spell it right in your question, and even highlighted it in bold!