No module named 'PyQt3D' - pyqt5

I have installed PyQt3D in the same virtual environment where I have PyQt5 up and running properly. However, I cannot import PyQt3D
>>> import PyQt3D
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt3D'
The module is properly installed
$ pip list
PyQt3D (5.9.2)
PyQt5 (5.9.1)
How can I fix this ?

I found the answer by searching through my python packages using pydoc.
PyQt3D does not expose an importable module name, but rather it adds the following submodules to the PyQt5 package, which is consistent with Qt5 documentation:
Qt3DCore
Qt3DExtras
Qt3DInput
Qt3DLogic
Qt3DRender
Objects defined by these submodules can then be imported normally like this
from PyQt5.Qt3DCore import QEntity

Related

why the scaffold doesn't work in odoo-14?

I have this problem in my terminal when I do this: python3 odoo-bin scaffold product
in /var/odoo/odoo-14/odoo$
Traceback (most recent call last):
File "/var/odoo/odoo-14/odoo/odoo-bin", line 5, in
import odoo
File "/var/odoo/odoo-14/odoo/odoo/init.py", line 75, in
import PyPDF2
ModuleNotFoundError: No module named 'PyPDF2'
how can i solve it ?
You need to install the missing python library.
pip install PyPDF2
Here is my blog link for the scaffold.
https://odedrabhavesh.blogspot.com/2021/09/how-to-create-odoo-custom-module-in-one-command.html

rqt_graph pyqt binding of qt_gui_cpp library

I am using ROS-melodic in ubuntu 18.04 LTS. I am getting this error:
Could not import "pyqt" bindings of qt_gui_cpp library - so C++ plugins will not be available:
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in <module>
from . import libqt_gui_cpp_sip
ImportError: dynamic module does not define module export function (PyInit_libqt_gui_cpp_sip)
however I have installed pyqt5 and pydot manually, rqt_graph shows up but with this warning. I want to know what can I do to get it right? Is this going to be problem in future? Now rqt_graph is loading but I don't know if this will mess up/create lacking in the graph?
Try uninstalling double packages if any using
pip3 uninstall PyQt5-sip PyQt5
Then try importing it in python3 to check if any other version is there.
If the import is successful then try running the command again
rosrun rqt_graph rqt_graph
if still some error exists install
pip3 install PyQt5==5.12

Tensorflow.io module is missing - how do I get gfile?

I'm trying to use the tensorflow.io.gfile module to load an inference graph. When I try to import the gfile module, so I can get to the GFile class, I get the following results:
>>> import tensorflow
>>> from tensorflow.io import gfile
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow.io'
No module named 'tensorflow.io'
>>> tensorflow.__version__
'2.0.0'
I'm on MacOS Catalina with Python 3.7.4.
How can I successfully import sub-modules of tensorflow.io if it's missing?
https://www.tensorflow.org/api_docs/python/tf/io/gfile/GFile
pip install tensorflow.io
Should solve the problem.
The answer relies on the assumption that you are using TF2.0, in which this functionality has been moved to a separate package.

faulty install of Matplotlib

Windows7 with python 3.4 32bit.
Downloaded and ran install according to this related question.
However I have a different error, so I posted a new question.
I removed the faulty install and tried the installer from the sourceforge link off matplotlib.org. Both finish claiming to be successful, though testing results in an error (both resulting in the same error)
from matplotlib import *
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from matplotlib import *
File "C:\Python34\lib\site-packages\matplotlib\__init__.py", line 105, in <module>
import six
ImportError: No module named 'six'
Actually you need to install six. As given in Python Error: "ImportError: No module named six"
Better you can install pip and install all libraries using that.

Numpy Install Mac Osx Python

I am using Python for my Linear Algebra course for programming. For the tools we need, I am trying to install NumPy. I used this website to guide me through the installation process.
I started from the links on SciPy's OS X page and eventually arrived at the SourceForge download site.
From there, I chose the Mac OS X installer numpy-1.6.1-py2.7-python.org-macosx10.3.dmg.
When I went to Idle and typed in
>>> import numpy as np
This is the error I received:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
import add_newdocs
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module>
from type_check import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py", line 5, in <module>
import multiarray
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so: no matching architecture in universal wrapper
I also tried it from the terminal and got the same error. I have a virtual environment installed - virtual env wrapper. I called the environment in the terminal by:
source my_new_env/bin/activate
And then I tried to import numpy in the terminal that way, but then I got the error:
(my_new_env) $ sudo python -c 'import numpy; numpy.test()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named numpy
I am not sure if I installed NumPy incorrectly or if my virtual environment is conflicting with Nose. If anyone has suggestions let me know!
i would skip the MacOS package install and use the 'pip install' instructions, since you're already familiar with virtualenvs. use these instructions instead: http://www.scipy.org/install.html#installing-via-pip
it's easier to work with a virtualenv and pip, which will ensure post-install that your virtualenv will have access to the modules you've installed. it takes more work to do that with an external package (or .dmg) that you've downloaded. not impossible, just more work. HTH.
Try these commands:
brew update, brew doctor
, because, in my case, I didn't even have to install numpy separately. Yet I could import numpy easily. Meanwhile you can try downloading the numpy package from this website.