h5py installation - ImportError: DLL load failed - h5py

I am having trouble in installing h5py on my Windows machine. I am getting an error message that says: "ImportError: DLL load failed: The specified module could not be found.". I would greatly appreciate if someone could explain how to fix this issue.
Here is the complete log:
Downloading/unpacking h5py
Running setup.py egg_info for package h5py
running egg_info
writing requirements to pip-egg-info\h5py.egg-info\requires.txt
writing pip-egg-info\h5py.egg-info\PKG-INFO
writing top-level names to pip-egg-info\h5py.egg-info\top_level.txt
writing dependency_links to pip-egg-info\h5py.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\h5py.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info\h5py.egg-info\SOURCES.txt'
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.1 in c:\program files (x86)\enthought\canopy32\app\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages (from h5py)
Requirement already satisfied (use --upgrade to upgrade): Cython>=0.17 in c:\program files (x86)\enthought\canopy32\app\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages (from h5py)
Downloading/unpacking six (from h5py)
Running setup.py egg_info for package six
running egg_info
writing pip-egg-info\six.egg-info\PKG-INFO
writing top-level names to pip-egg-info\six.egg-info\top_level.txt
writing dependency_links to pip-egg-info\six.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\six.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'documentation\_build'
writing manifest file 'pip-egg-info\six.egg-info\SOURCES.txt'
Source in c:\users\ibm_admin\build\six has version 1.9.0, which satisfies requirement six (from h5py)
Installing collected packages: h5py, six
Running setup.py install for h5py
Running command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt
running install
running build
running build_py
running build_ext
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.8.4'
MPI Enabled: False
Rebuild Required: False
********************************************************************************
Executing cythonize()
Autodetection skipped [[Error 126] The specified module could not be found]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\IBM_ADMIN\build\h5py\setup.py", line 140, in <module>
cmdclass = CMDCLASS,
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python27\Lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\Lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "setup_build.py", line 172, in run
self.extensions = cythonize(self._make_extensions(config),
File "setup_build.py", line 72, in _make_extensions
import numpy
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\__init__.py", line 168, in <module>
from . import add_newdocs
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\__init__.py", line 18, in <module>
from .polynomial import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\polynomial.py", line 19, in <module>
from numpy.linalg import eigvals, lstsq, inv
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\__init__.py", line 50, in <module>
from .linalg import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\linalg.py", line 29, in <module>
from numpy.linalg import lapack_lite, _umath_linalg
ImportError: DLL load failed: The specified module could not be found.
Complete output from command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt:
running install
running build
running build_py
running build_ext
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.8.4'
MPI Enabled: False
Rebuild Required: False
Executing cythonize()
Autodetection skipped [[Error 126] The specified module could not be found]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\IBM_ADMIN\build\h5py\setup.py", line 140, in <module>
cmdclass = CMDCLASS,
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python27\Lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\Lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "setup_build.py", line 172, in run
self.extensions = cythonize(self._make_extensions(config),
File "setup_build.py", line 72, in _make_extensions
import numpy
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\__init__.py", line 168, in <module>
from . import add_newdocs
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\__init__.py", line 18, in <module>
from .polynomial import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\polynomial.py", line 19, in <module>
from numpy.linalg import eigvals, lstsq, inv
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\__init__.py", line 50, in <module>
from .linalg import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\linalg.py", line 29, in <module>
from numpy.linalg import lapack_lite, _umath_linalg
ImportError: DLL load failed: The specified module could not be found.
----------------------------------------
Command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt failed with error code 1
Exception information:
Traceback (most recent call last):
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\basecommand.py", line 126, in main
self.run(options, args)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\commands\install.py", line 228, in run
requirement_set.install(install_options, global_options)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\req.py", line 1100, in install
requirement.install(install_options, global_options)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\req.py", line 572, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt failed with error code 1

Related

ckan.plugins.core.PluginNotFoundException: pdf_view Error

I installed CKAN 2.8.5 from package on Ubuntu 16.04. I activated the ckanext-pdfview. Everything is OK. Bu t when I run paster commands I received the below error.
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 8, in <module>
sys.exit(run())
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 1108, in command
self._load_config()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 330, in _load_config
self.site_user = load_config(self.options.config, load_site_user)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 237, in load_config
load_environment(conf.global_conf, conf.local_conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 116, in load_environment
p.load_all()
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 140, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 154, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 257, in _get_service
raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: pdf_view
I found the solution. When I entered into the virtual environment I ran the pip command with path. First I found the path with which pip command in the virtual env and then I ran the pip command with path.

Apache Beam Python wordcount example errors on Windows10

I am running Anaconda - conda virtual env with Python 2.7
I have followed Apache Beam Python SDK Quickstart
When I run -
'python -m apache_beam.examples.wordcount --input C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache Beam\examples\wordcount\kinglear.txt --output C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache Beam\examples\wordcount\output.txt'
I get following error:
INFO:root:Missing pipeline option (runner). Executing pipeline using the default runner: DirectRunner.
Traceback (most recent call last):
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\examples\wordcount.py", line 136, in <module>
run()
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\examples\wordcount.py", line 90, in run
lines = p | 'read' >> ReadFromText(known_args.input)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\textio.py", line 524, in __init__
skip_header_lines=skip_header_lines)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\textio.py", line 119, in __init__
validate=validate)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\filebasedsource.py", line 121, in __init__
self._validate()
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\options\value_provider.py", line 133, in _f
return fnc(self, *args, **kwargs)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\filebasedsource.py", line 181, in _validate
'No files found based on the file pattern %s' % pattern)
IOError: No files found based on the file pattern C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache
Any help most appreciated.
IOError: No files found based on the file pattern C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache
Your input string has a space in it. Add quotes.

error pip install scipy on command prompt

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\akbar>sudo -i
'sudo' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\akbar>pip install scipy
Collecting scipy
Using cached scipy-0.19.0.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\akbar\AppData\Local\Temp\pip-build-yr7qne_9\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\akbar\AppData\Local\Temp\pip-build-yr7qne_9\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "C:\Users\akbar\Miniconda3\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py", line 315, in __init__
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py", line 361, in fetch_build_eggs
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 851, in resolve
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 1123, in best_match
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 1135, in obtain
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py", line 428, in fetch_build_egg
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\easy_install.py", line 652, in easy_install
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 635, in fetch_distribution
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 616, in find
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 559, in download
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 804, in _download_url
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 810, in _attempt_download
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 725, in _download_to
File "C:\Users\akbar\Miniconda3\lib\http\client.py", line 449, in read
n = self.readinto(b)
File "C:\Users\akbar\Miniconda3\lib\http\client.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:\Users\akbar\Miniconda3\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:\Users\akbar\Miniconda3\lib\ssl.py", line 1002, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\akbar\Miniconda3\lib\ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
File "C:\Users\akbar\Miniconda3\lib\ssl.py", line 625, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
Command python setup.py egg_info failed with error code 1 in C:\Users\akbar\AppData\Local\Temp\pip-build-yr7qne_9\scipy\
C:\Users\akbar>sd
i have no idea what should i do
You can install scipy in Windows from a binary
or any of the scientific python distributions (recommended).
However, looks like a network error. So try pip install scipy --no-cache-dir to skip install from cache.

Installing scipy for windows 10 within my virtual environment for python 3.5

I want to install scipy for my virtual environment. I have scipy when installed Anaconda but my virtual envrionment doesn't have the package. I tried pip install scipy and resulted an error.
Running from scipy source directory.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-build-nwih6b4a\scipy\setup.py", line 415, in <module>
setup_package()
File "C:\Users\user\AppData\Local\Temp\pip-build-nwih6b4a\scipy\setup.py", line 411, in setup_package
setup(**metadata)
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\user\AppData\Local\Temp\pip-build-nwih6b4a\scipy\setup.py", line 335, in configuration
config.add_subpackage('scipy')
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
caller_level = 2)
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\misc_util.py", line 907, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\setup.py", line 15, in configuration
config.add_subpackage('linalg')
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
caller_level = 2)
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\user\pmengine\pmenv\lib\site-packages\numpy\distutils\misc_util.py", line 907, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\linalg\setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Command "c:\users\user\pmengine\pmenv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-build-nwih6b4a\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-qdxr5rtc-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\user\pmengine\pmenv\include\site\python3.5\scipy" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-build-nwih6b4a\scipy\
I tried downloading the wheel scipy-0.18.1-cp36-cp36m-win_amd64.whl in my virtual environment folder and do the
pip install scipy-0.18.1-cp36-cp36m-win_amd64
But it still returned
(pmenv) C:\Users\user\pmengine\pmenv>pip install scipy-0.18.1-cp36-cp36m-win_amd64.whl
scipy-0.18.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
Please help!

how to properly resolve gsutil error

I just installed gsutil on OS X, exactly following Google's instruction, and am seeing errors of the following format when running any gsutil command:
Traceback (most recent call last):
File "/Users//gsutil/gsutil", line 22, in <module>
gsutil.RunMain()
File "/Users//gsutil/gsutil.py", line 101, in RunMain
sys.exit(gslib.__main__.main())
File "/Users//gsutil/gslib/__main__.py", line 175, in main
command_runner = CommandRunner()
File "/Users//gsutil/gslib/command_runner.py", line 107, in __init__
self.command_map = self._LoadCommandMap()
File "/Users//gsutil/gslib/command_runner.py", line 113, in _LoadCommandMap
__import__('gslib.commands.%s' % module_name)
File "/Users//gsutil/gslib/commands/disablelogging.py", line 16, in <module>
from gslib.command import COMMAND_NAME
ImportError: cannot import name COMMAND_NAME
This error occurs on several modules in the commands directory. The only thing I could do to get rid of these errors is to remove the following modules from the directory which reference COMMAND_NAME: disablelogging, enablelogging, getacl, getcors, getdefacl, getlogging, setacl, setcors, setdefacl.
Did I do the right thing here? Is this a bug in gsutil?