I installed h5py through the package mingw64-i686-python-h5py in MSYS2. Importing it in a MinGW shell throws the following error:
Python 3.8.2 (default, Apr 9 2020, 14:12:45) [GCC 9.3.0 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import h5py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:/msys64/mingw32/lib/python3.8/site-packages/h5py/__init__.py", line 34, in <module>
from . import version
File "C:/msys64/mingw32/lib/python3.8/site-packages/h5py/version.py", line 17, in <module>
from . import h5 as _h5
File "h5py/h5.pyx", line 1, in init h5py.h5
ImportError: DLL load failed while importing defs: The specified procedure could not be found.
Reinstalling the package did not fix it. I installed numpy the same way and it works just fine.
Related
I have installed Microsoft Visual C++ 14.0 and I have uninstalled and installed Anaconda and packages(pandas, pandas-datareader) several times.
Now I installed zipline by pip install zipline but when I try to import zipline I got a importerror
Python 3.5.5 |Anaconda, Inc.| (default, Apr 7 2018, 04:53:16) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda3\envs\py35\lib\site-packages\zipline\__init__.py", line 25, in <module>
from . import data
File "C:\Anaconda3\envs\py35\lib\site-packages\zipline\data\__init__.py", line 1, in <module>
from . import loader
File "C:\Anaconda3\envs\py35\lib\site-packages\zipline\data\loader.py", line 26, in <module>
from pandas.io.data import DataReader
ImportError: No module named 'pandas.io.data'
I create a new environment (my_syft env) with conda and python 3.9.7 and install syft 0.5.0.
Then I check the installation of my module and it's seem that the installations pass correctly
C:\Users\tamir>conda activate my_syft_env
(my_syft_env) C:\Users\tamir>python
Python 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import syft
>>>
>>> import sys
>>> print(sys.executable)
C:\Users\tamir\anaconda3\envs\my_syft_env\python.exe
>>>
Then in try to run and check my module in VScode and choose the current environment C:\Users\tamir\anaconda3\envs\my_syft_env\python.exe
import syft
print("hellow")
but get en error
Traceback (most recent call last):
File "c:\Users\tamir\Desktop\TAMIR\pyton vscode\federated.py", line 1, in <module>
import syft
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\__init__.py", line 48, in <module>
from syft.core.node.device.device import Device # noqa: F401
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\core\node\device\__init__.py", line 2, in <module>
from .client import DeviceClient
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\core\node\device\client.py", line 16, in <module>
from ..common.client import Client
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\core\node\common\client.py", line 18, in <module>
from ....lib import create_lib_ast
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\lib\__init__.py", line 28, in <module>
from ..lib.torch import create_torch_ast
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\lib\torch\__init__.py", line 12, in <module>
from . import parameter # noqa: 401
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\lib\torch\parameter.py", line 9, in <module>
from ...lib.torch.tensor_util import tensor_deserializer
File "C:\Users\tamir\anaconda3\lib\site-packages\syft\lib\torch\tensor_util.py", line 2, in <module>
import pyarrow as pa
File "C:\Users\tamir\anaconda3\lib\site-packages\pyarrow\__init__.py", line 63, in <module>
import pyarrow.lib as _lib
ImportError: DLL load failed while importing lib: The specified procedure could not be found.
I dont know why there is an error.
I may be late, but to paraphrase this thread, you might have installed libboost and boost-cpp from the default conda channels. Try the following:
conda install libboost boost-cpp -c conda-forge
If on a Windows machine, make sure you have Visual C++ Redistributables 2019 or later.
See if the pip version of pyarrow works.
I have recently upgraded the system to 16.04 Gnome. The most troubling thing that I am facing is that I cannot import a NAOqi library for my work. The python version of this library was pretty simple to set-up. One just has to untar the file and then enter a path variable called PYTHONPATH pointing to this library and it worked like a charm in 14.04. Now since upgrade I am facing:
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import naoqi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dell/nao_sdk/pynaoqi/naoqi.py", line 7, in <module>
import qi
File "/home/dell/nao_sdk/pynaoqi/qi/__init__.py", line 72, in <module>
from _qi import Application as _Application
ImportError: libqipython.so: cannot open shared object file: No such file or directory
If I add a path variable:
export LD_LIBRARY_PATH=:/home/dell/nao_sdk/pynaoqi/
The error changes to:
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import naoqi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dell/nao_sdk/pynaoqi/naoqi.py", line 7, in <module>
import qi
File "/home/dell/nao_sdk/pynaoqi/qi/__init__.py", line 72, in <module>
from _qi import Application as _Application
ImportError: libboost_regex.so.1.55.0: cannot open shared object file: No such file or directory
Please help me what should I do to get it working? I have also used python 2.6.9 but same error occurs with error below.
ImportError: libboost_python.so.1.55.0: cannot open shared object file: No such file or directory
Installing libboost1.55 did the trick. 16.04 comes with libboost1.58 but naoqi is not yet compatible with it. Manual installation of libboost1.55 solved the import error.
I need to use the VTK library (with version 5.10 because I am working on an existing code) in python on my Windows 10 machine but I can not manage to import it without DLLImport error:
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\vtk\__init__.py", line 139, in <module>
__helper.refine_import_err('qvtk', 'vtkQtPython', exc)
File "C:\Python27\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err
raise LinkError, str(exc)
vtk.__helper.LinkError: DLL load failed: The specified module could not be found.
I have installed PyQt4 4.11.4 and VTK 5.10.1 in 32 bits version (my Python 2.7.12 installation is 32 bits too), downloaded here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
I think the issue is related to the vtkQtPython pyd and dll (the files are vtkQtPython.pyd which tries to load vtkQtPythonD.dll:
>>> import qvtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "qvtk.py", line 5, in <module>
from vtkQtPython import *
ImportError: DLL load failed: The specified module could not be found.
>>> import vtkQtPython
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
Importing vtk using the latest version (7.0.0) does work, but is not compatible with the code I am working on. I have already tried uninstalling and set-up the whole installation again (all libraries and Python itself).
I hope you'll find some ideas, I still could not find any solution after hours struggling.
I am trying to use sklearn in Windows 7 with Python 3.5, via the pre-compiled Windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/
I have installed
dask-0.7.5-py2.py3-none-any.whl
scikit_learn-0.17-cp35-none-win_amd64.whl
scipy-0.16.1-cp35-none-win_amd64.whl
numpy-1.9.3+mkl-cp35-none-win_amd64.whl
pandas-0.17.1-cp35-none-win_amd64.whl
without any errors at install time. Following another SO thread with the same error, I made sure that C:/python35 is both in my Path and is set as the PYTHONPATH.
I also have Visual Studio 2013 C++ installed.
When I go to import sklearn I get this error:
C:\Users\user>python
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python35\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "C:\Python35\lib\site-packages\sklearn\base.py", line 9, in <module>
from scipy import sparse
File "C:\Python35\lib\site-packages\scipy\sparse\__init__.py", line 213, in <module>
from .csr import *
File "C:\Python35\lib\site-packages\scipy\sparse\csr.py", line 13, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: DLL load failed: The specified module could not be found.
Update: BrianCain's suggestion to upgrade Visual Studio C++ to version 2015 worked!