I installed a new version of Pycharm (2019.3.1) and running my old codes on them. But I am getting error for qt library incompatibility. I tried to update the qt package from conda (as I am using conda distribution for the python).
I noticed the following behavior -
The error comes only for the plotting (which makes sense as qt is for graphical purposes).
There is no problem in code compilation and running, as it shows the result for the 1 epoch (can be seen in the below image.
My installed qt version is 5.9 (you can see in the second image)
The same code runs perfectly in spider but throwing the below error in pycharm. Please help me to fix this problem. thanks
From error message you posted it is clear that you have library incompatibility problem.
Somehow it appears you have 2 Qt versions installed - 5.9.7 and 5.12.4 and these versions have conflict with each other.
You need to verify Run configuration in PyCharm to see which python environment it uses. And then check why 2 Qt are available in your system.
Anothe option that comes to my mind - your PyQt5 or PySide2 (whatever you use) library is built with Qt 5.12.4 while your system have 5.9.7 and it brings a conflict.
Related
I have a python package that acts like a wrapper for a .dll written in C#. The binary is imported into python by the pythonnet package. Thus, the user can access the functionality of the so called cs_backend.dll conveniently from the python side. The import looks as follows:
import clr as __clr
import System as __System
__clr.AddReference(PATH_TO_CS_BACKEND + "\\cs_backend")
import cs_backend as __csb # exception thrown here
However, it seems that python can't import the .dll as I get a ModuleNotFoundError: No module named 'cs_backend'.
The odd thing is that this error only occures when running the code from Spyder. Executing exactly the same code from Visual Studio Code works perfectly fine.
Do you have any idea what the problem could be?
system specifications
os: windows 10
.net framework v4.5.1
python 3.8.5
spyder 4.2.1
Edit:
I have found a github issue on the pythonnet repository that describes a similar (although not quite the same) problem. However, since it has been open for about 3 years, it seems that there is little to no progress on that.
Edit 2:
There is a similar question here on stack overflow. The solution was to install a newer .NET Framework. This is not my problem since with any IDE other than Spyder the code works just fine. Thus, I guess that this is mainly a Spyder issue.
Currently, it seems that there is neither a solution nor an effort to resolve this problem.
It looks like the problem is caused by the IPython console integrated in Spyder.
A simple workaround is to execute the python script from the system console.
In Spyder this can be done by going to Run - Configuration per file - Execute in external system console.
With the new configuration it is at least possible to run the script.
I am trying to run a Python script in my terminal that uses the cv2 library and I am getting the following error message. It appears that there is a conflict between two instances of RunLoopModeTracker in my Anaconda environment. I have uninstalled and reinstalled Anaconda and the same thing happens.
objc[80110]: Class RunLoopModeTracker is implemented in both
/Users/satyadoraisamy/opt/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/QtCore
(0x1079527f0) and
/Users/satyadoraisamy/opt/anaconda3/lib/libQt5Core.5.9.7.dylib
(0x11b86ba80). One of the two will be used. Which one is undefined.
You might be loading two sets of Qt binaries into the same process.
Check that all plugins are compiled against the right Qt binaries.
Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries
are being loaded.
Any idea how to solve this (or specify which of the two instances I want to use)?
Thanks.
I'm running Anaconda/Spyder and I keep getting the Intel Math Library error shown in the picture:
It seems like an entry point for mkl_blas_dgem2vu is missing (whatever that is).
I was still able to run Spyder until I tried updating everything. After updating Spyder doesn't start after receiving this error.
I stuck and can't do anything right now.
Thanks.
I already found that post and it solved part of my problem.
First part of problem is that different a version of the MKL library was in the system32 & SYSWOW64 directories. It was loaded by another application. Anaconda was using those libraries instead of the one installed for Anaconda. I eliminated the other versions of the MKL libraries and reinstalled Anaconda. I tried without re-installing and it didn't work.
The 2nd problem was solved with that post you suggested that I found on my own. It seems like Spyder or Ipython is not compatible with the newest version of the MKL_intel_thread.dll library. I downgraded and I'm back in business.
I have several different qt packages installed for my development environment on Ubuntu 15.04 (3.19.0-51-generic), and I can't seem to get my imports correct. The error I am running into in PyCharm is:
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: No module named 'PyQt5.QtWebEngineWidgets'
The following packages I have installed already, which I believe to be relevant are as follows:
python3-pyqt5
python3-pyqt5-dbg
python-pyqt5
python-pyqt5-dbg
pyqt5-dev-tools
pyqt5-dev
python-pyqt5.qtwebkit
python3-pyqt5.qtwebkit
python-pyqt5.qtwebkit-dbg
python3-pyqt5.qtwebkit-dbg
What am I missing here? Note that the project explicitly requires the following in its README:
Qt 5.5+
PyQt5.6+
Furthermore, I understand that webengine and webkit are two different things (I was giving it a stab). I can't find any Webengine for PyQT5 anywhere in the official Vivid repository. I tried installing libqt5webengine5-dev and libqt5webengine5 from https://launchpad.net/~ethereum/+archive/ubuntu/ethereum-qt packages with the same result, perhaps I need to add something to Python path. Can anyone lend a hand (Im normally a .NET developer :/)?
I'm using python 2.7.9 and encountered a problem when installing pygtk.
It displayed "Runtime error!...R6034 An application has made an attempt to load the C runtime library incorrectly" when installing numpy/scipy after pygtk being installed.
I tried to figure it out by searching it in stackoverflow and found two similar questions: Runtime error R6034 in embedded Python application and An application has made an attempt to load the C runtime library incorrectly.
So following the first one, I deleted the path corresponding to msvcr90.dll, however, it still cannot work. Then I chose to simply delete msvcr90.dll; at this time, this error wasn't presented when installing numpy/scipy, however, these two modules cannot work when simply typing "importing numpy/scipy".
I also renamed gtk-2.0 following the second one. Then numpy and scipy can be successfully installed. But it displayed "Error processing line 3 of C:\Python27\lib\site-packages\pygtk.pth" when installing matplotlib using pip.
I'm really confused about it. Can anybody provide some methods to fix it?
I've installed Python and PyGTK on 5+ machines, at least two of them brand new, clean builds of Win 7.
I've got the An application has made an attempt to load the C runtime library incorrectly error whenever I install a Python package as a windows installer (rather than using pip) on all these machines. It's annoying, but has never made a jot of difference, both Python and Gtk function correctly.
You've deleted msvcr90.dll, and that is why you get your Error processing line 3... If you look at this file, you'll see that line 3 is import runtime, and if you look further into the 'runtime' package, you'll see that this then tries to find the missing dll.
I think your best bet is to try to restore the missing file. If it's still in your recycle bin - great!
If not, the best thing to do is reinstall the Visual C++ runtime library
I made this video to show my way: https://www.youtube.com/watch?v=s6jhR1VBfeU. I use Anaconda to embedded Python in my C++ application. I simply changed "msvcr90.dll" to "msvcr90.dll_hihi" in 3 folders:
C:\Users\your user\Anaconda2\Library\bin, C:\Users\your user\Anaconda2 and C:\Program Files\Intel\iCLS Client (for x64)