H5py import not working in Maya - python

I'm trying to install h5py in Maya. It seems like its installed properly in the correct folder, i.e. : C:\Program Files\Autodesk\Maya2018\Python\Lib\site-packages\h5py. But when I try to import h5py in Maya's Python tab, I'm getting the following error
ImportError: file C:\Program Files\Autodesk\Maya2018\Python\lib\site-packages\h5py\__init__.py line 26:
DLL load failed: The specified module could not be found.

Got this thing working , if anyone is facing this issue please follow the following article http://3deeplearner.com/neural-network-inside-maya/
The author of this tutorial helped a lot with the required solution for this issue
Thank you Gus from 3deeplearner.com

Related

Python importing ActiveX DLL issue

This will be my first question.
I am trying to use python to import a SDK which provides ActiveX DLL and ocx file.
I tried using
clr.FindAssembly(“dllname.dll”)
clr.AddReference(“dllname”)
to load while I have error showing:
System.IO.FileNotFoundException: Unable to find assembly 'MyDLL'
Python.Runtime.CLRModule.AddReference(String name)
Then I tried using
ctypes.WinDLL(‘dllname.DLL’)
But I cannot find any functions inside of it.
Can anyone tried to provide any ideas?
Many thanks!

Creating executable with Cx_freeze : ImportError: cannot import name _ni_support (scipy)

I am trying to create an executable from a python script, I have had a few issues that I have solved simply manually importing other modules/scripts, but for some reason it doesn't worth with this one. The error message:
File "C:\Program Files\Miniconda2\lib\site-packages\scipy\ndimage\filters.py", line 35, in <module>
from . import _ni_support
ImportError: cannot import name _ni_support
Did anyone have this problem before? I can't seem to find it anywhere online. (I found similar problems with _ni_support but never with scipy.
I already tried reinstalling every package/module, but the problem is still there.
Thank you all for your patience.
Solved:
For some unknow reason I had the following unused import added to my script a couple commits earlier:
from skimage.feature.tests.test_censure import img
Removing it solved the issue.

win8.1 64 bit + python 2.7.3 + import htql; ImportError: DLL load failed: The specified module could not be found

This is the first time to use python and need to import htql
when i run this code:
import htql;
page="<a href=a.html>1</a><a href=b.html>2</a><a href=c.html>3</a>";
query="<a>:href,tx";
for url, text in htql.HTQL(page, query):
print(url, text);
i got the following error:
import htql; ImportError: DLL load failed: The specified module could not be found.
error screenshot
i trys to to solve error as refered here ImportError: DLL load failed: The specified module could not be found
BUT error still exists!!
Also i am Installing the Visual C++ Redistributable für Visual Studio 2015 from this links: https://www.microsoft.com/de-at/download/details.aspx?id=48145
to fix the missing DLLs
BUT error still exists!
Please help!
THNAKS IN ADVANCE ..
The problem of the questioner is he followed installation instructions from HTQL PDF-manual named Hyper-Text Query Language COM Interface, which obviously describes library setup for COM (Component Object Model by Microsoft), proposing regsvr32 <path-to-dll>. Intended to be used within win32-infrastructure aware applications first place
While there are means to use COM from within python (e.g. via pywin32 and others), it's not common method python script expects.
Proper solution is to follow instructions from HTQL home page, suggesting:
Windows binaries: Download the htql.zip and extract "htql.pyd" to the Python's DLLs directory, such as in 'C:\Python27\DLLs\' or 'C:\Python32\DLLs\'.
to install precompiled python .pyd module within python libraries search path

ImportError when installing newspaper

I am pretty new to python and am trying to import newspaper for article extraction. Whenever I try to import the module I get ImportError: cannot import name images. Anyone come across this problem and found a solution?
I was able to fix this problem by creating an images directory in /usr/local/lib/python2.7/dist-packages/newspaper , moving images.py to this directory, and placing a blank __init__.py in this directory.
I know this is a dated entry, but to anyone else that faced the same issue as me, I initially fumbled with resolving this issue. When I first run import newspaper, I faced this error. lxml runtime error: Reason: Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
When I tried to re-run my code (without correcting anything), I got the error found on this article. I have no idea why this was the case, and I wasn't able to resolve my issue using the above method (it didn't work for me, but it could still work for you). If anyone was fumbling like me on Jupyter on getting newspaper to work, do consider the link below. Hope this is helpful.
https://stackoverflow.com/a/31607751/6143792

Issue with using protobufs with python ImportError: cannot import name descriptor_pb2

Context
Steps taken:
Environment Setup
I've installed protobufs via Home Brew
I've also followed the steps in the proto-bufs python folder's readme on installing python protobufs - namely running the python setup.py install command
I've using the protobuf-2.4.1 files
Coding
I have a python file (generated from a .proto file I compiled) that contains the statement, among other import statements, but I believe this one is the one causing issues:
from google.protobuf import descriptor_pb2
The above python file, I'm importing in another python file, it's
this python file that I want to write up logic for parsing the
protobufs data files I receive
Error received
I get this error when running that file:
Steps taken to fix
Searched google for that error - didn't find much
Looked at this question/answer Why do I see "cannot import name descriptor_pb2" error when using Google Protocol Buffers?
I don't really understand the above questions selected answer,I tried to run the command in the above answer protoc descriptor.proto --python_out=gen/ by coping and pasting it in the terminal in different places but couldn't get it to work
Question
How do I fix this error?
What is the underlying cause?
How do I check if the rest of my protobuf python compiler/classes are set up correctly?
I've discovered the issue. I had not run the python install instructions the first time I tried to compile this file. I recompiled the file and this issue was fixed.

Categories