Can't install pycuda with pip - python

I am trying to install the PyCUDA module to run some python script I downloaded, but trying to install it with pip doesn't work.
I run pip install pycuda on the command line
At first, I get this:
Collecting pycuda
Using cached pycuda-2020.1.tar.gz (1.6 MB)
Requirement already satisfied: pytools>=2011.2 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (2020.4)
Requirement already satisfied: decorator>=3.2.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (4.4.2)
Requirement already satisfied: appdirs>=1.4.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (1.4.4)
Requirement already satisfied: mako in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pycuda) (1.1.3)
Requirement already satisfied: six>=1.8.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pytools>=2011.2->pycuda) (1.11.0)
Requirement already satisfied: numpy>=1.6.0 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from pytools>=2011.2->pycuda) (1.14.1)
Requirement already satisfied: MarkupSafe>=0.9.2 in c:\users\jules\appdata\local\programs\python\python36-32\lib\site-packages (from mako->pycuda) (1.1.1)
Using legacy 'setup.py install' for pycuda, since package 'wheel' is not installed.
Installing collected packages: pycuda
Running setup.py install for pycuda ... error
Then, this appears (all in red):
ERROR: Command errored out with exit status 1:
command: 'c:\users\jules\appdata\local\programs\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\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\Jules\AppData\Local\Temp\pip-record-vlpoymu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jules\appdata\local\programs\python\python36-32\Include\pycuda'
cwd: C:\Users\Jules\AppData\Local\Temp\pip-install-rehu_ea2\pycuda\
Complete output (82 lines):
***************************************************************
*** WARNING: nvcc not in path.
*** May need to set CUDA_INC_DIR for installation to succeed.
***************************************************************
*************************************************************
*** I have detected that you have not run configure.py.
*************************************************************
*** Additionally, no global config files were found.
*** I will go ahead with the default configuration.
*** In all likelihood, this will not work out.
***
*** See README_SETUP.txt for more information.
***
*** If the build does fail, just re-run configure.py with the
*** correct arguments, and then retry. Good luck!
*************************************************************
*** HIT Ctrl-C NOW IF THIS IS NOT WHAT YOU WANT
*************************************************************
Continuing in 1 seconds...
c:\users\jules\appdata\local\programs\python\python36-32\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'test_requires'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pycuda
copying pycuda\autoinit.py -> build\lib.win32-3.6\pycuda
copying pycuda\characterize.py -> build\lib.win32-3.6\pycuda
copying pycuda\compiler.py -> build\lib.win32-3.6\pycuda
copying pycuda\cumath.py -> build\lib.win32-3.6\pycuda
copying pycuda\curandom.py -> build\lib.win32-3.6\pycuda
copying pycuda\debug.py -> build\lib.win32-3.6\pycuda
copying pycuda\driver.py -> build\lib.win32-3.6\pycuda
copying pycuda\elementwise.py -> build\lib.win32-3.6\pycuda
copying pycuda\gpuarray.py -> build\lib.win32-3.6\pycuda
copying pycuda\reduction.py -> build\lib.win32-3.6\pycuda
copying pycuda\scan.py -> build\lib.win32-3.6\pycuda
copying pycuda\tools.py -> build\lib.win32-3.6\pycuda
copying pycuda\_cluda.py -> build\lib.win32-3.6\pycuda
copying pycuda\_mymako.py -> build\lib.win32-3.6\pycuda
copying pycuda\__init__.py -> build\lib.win32-3.6\pycuda
creating build\lib.win32-3.6\pycuda\gl
copying pycuda\gl\autoinit.py -> build\lib.win32-3.6\pycuda\gl
copying pycuda\gl\__init__.py -> build\lib.win32-3.6\pycuda\gl
creating build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\cg.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\coordinate.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\inner.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\operator.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\packeted.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\pkt_build.py -> build\lib.win32-3.6\pycuda\sparse
copying pycuda\sparse\__init__.py -> build\lib.win32-3.6\pycuda\sparse
creating build\lib.win32-3.6\pycuda\compyte
copying pycuda\compyte\array.py -> build\lib.win32-3.6\pycuda\compyte
copying pycuda\compyte\dtypes.py -> build\lib.win32-3.6\pycuda\compyte
copying pycuda\compyte\__init__.py -> build\lib.win32-3.6\pycuda\compyte
running egg_info
writing pycuda.egg-info\PKG-INFO
writing dependency_links to pycuda.egg-info\dependency_links.txt
writing requirements to pycuda.egg-info\requires.txt
writing top-level names to pycuda.egg-info\top_level.txt
reading manifest file 'pycuda.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'doc\source\_static\*.css'
warning: no files found matching 'doc\source\_templates\*.html'
warning: no files found matching '*.cpp' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.html' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.inl' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.txt' under directory 'bpl-subset\bpl_subset\boost'
warning: no files found matching '*.h' under directory 'bpl-subset\bpl_subset\libs'
warning: no files found matching '*.ipp' under directory 'bpl-subset\bpl_subset\libs'
warning: no files found matching '*.pl' under directory 'bpl-subset\bpl_subset\libs'
writing manifest file 'pycuda.egg-info\SOURCES.txt'
creating build\lib.win32-3.6\pycuda\cuda
copying pycuda\cuda\pycuda-complex-impl.hpp -> build\lib.win32-3.6\pycuda\cuda
copying pycuda\cuda\pycuda-complex.hpp -> build\lib.win32-3.6\pycuda\cuda
copying pycuda\cuda\pycuda-helpers.hpp -> build\lib.win32-3.6\pycuda\cuda
copying pycuda\sparse\pkt_build_cython.pyx -> build\lib.win32-3.6\pycuda\sparse
running build_ext
building '_driver' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jules\appdata\local\programs\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jules\\AppData\\Local\\Temp\\pip-install-rehu_ea2\\pycuda\\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\Jules\AppData\Local\Temp\pip-record-vlpoymu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jules\appdata\local\programs\python\python36-32\Include\pycuda' Check the logs for full command output.
I have no idea what this error is about, or how to fix it (and I don't want to get into complicated installations that will take me hours and might not even work). I'm not even sure what this module does (yet). Do you have an idea to help me?
(edit: I'm on Windows 10, and I have not installed anything about PyCUDA before)

Try the following.
pip install pipwin
pipwin install pycuda

Related

How does one install torchmeta for a ppc64le architecture in pytorch?

I was trying to use torchmeta in a ppc64le architecture. Unfortunately it's not been easy to install since ppc64le requires special binaries to work.
I eventually managed to get the right binaries for pytorch and torchvision by following these instructions (that prepend the right ibm channel with the conda binaries, plus installs all the required files too):
conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/
conda create -n my_new_env python=3.7 powerai=1.7.0
conda activate my_new_env
after that I proceeded to install the right version of torchmeta, which was 1.3.1 since ppc64le only has pytorch 1.3.1 and torchvision 0.4.2. So I did:
pip install torchmeta==1.3.1
but now I have a new error that it cannot find the right version of h5py compatible with what I want to do. The error message is to large to paste but I will paste what I hope are useful part of it:
(my_new_env) [miranda9#hal-login ~]$ pip install torchmeta==1.3.1
Collecting torchmeta==1.3.1
Using cached torchmeta-1.3.1-py3-none-any.whl (144 kB)
Requirement already satisfied: requests in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (2.22.0)
Requirement already satisfied: torchvision<0.6.0,>=0.4.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (0.4.2)
Requirement already satisfied: torch<1.5.0,>=1.3.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (1.3.1)
Processing ./.cache/pip/wheels/87/f5/ad/9f04a48453875e8054c19f9fe3f50cbbe0c09b956835555019/Pillow-6.2.2-cp37-cp37m-linux_ppc64le.whl
Requirement already satisfied: numpy>=1.14.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (1.17.4)
Requirement already satisfied: tqdm>=4.0.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (4.36.1)
Collecting h5py~=2.9.0
Using cached h5py-2.9.0.tar.gz (287 kB)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (2020.6.20)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (1.25.10)
Requirement already satisfied: idna<2.9,>=2.5 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (2.8)
Requirement already satisfied: six in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchvision<0.6.0,>=0.4.0->torchmeta==1.3.1) (1.13.0)
Building wheels for collected packages: h5py
Building wheel for h5py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/miranda9/.conda/envs/my_new_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ccg1oj0n
cwd: /tmp/pip-install-bpmeop26/h5py/
Complete output (1321 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-ppc64le-3.7
creating build/lib.linux-ppc64le-3.7/h5py
copying h5py/__init__.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/h5py_warnings.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/highlevel.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/ipy_completer.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/version.py -> build/lib.linux-ppc64le-3.7/h5py
creating build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/attrs.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/base.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/compat.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/dataset.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/datatype.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/dims.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/files.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/filters.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/group.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/selections.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/selections2.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/vds.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
creating build/lib.linux-ppc64le-3.7/h5py/tests
copying h5py/tests/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests
copying h5py/tests/common.py -> build/lib.linux-ppc64le-3.7/h5py/tests
creating build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_attrs.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_attrs_data.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_base.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_dataset.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_datatype.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_dimension_scales.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_file.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_file_image.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_group.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5d_direct_chunk_write.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5f.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5p.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5t.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_objects.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_selections.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_slicing.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
creating build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_attribute_create.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_dataset_getitem.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_dataset_swmr.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_datatype.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_deprecation.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_dims_dimensionproxy.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_file.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_filters.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_threads.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
creating build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_highlevel_vds.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_lowlevel_vds.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_virtual_source.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
running build_ext
Autodetected HDF5 1.10.2
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.10.2'
MPI Enabled: False
Rebuild Required: True
********************************************************************************
Executing api_gen rebuild of defs
Executing cythonize()
[ 1/22] Cythonizing /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pyx
/tmp/pip-install-bpmeop26/h5py/.eggs/Cython-0.29.21-py3.7.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
...
/home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^
In file included from /tmp/pip-install-bpmeop26/h5py/h5py/defs.c:654:0:
/tmp/pip-install-bpmeop26/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for h5py
Running setup.py clean for h5py
Failed to build h5py
DEPRECATION: Could not build wheels for h5py which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: Pillow, h5py, torchmeta
Attempting uninstall: Pillow
Found existing installation: Pillow 7.1.2
Uninstalling Pillow-7.1.2:
Successfully uninstalled Pillow-7.1.2
Attempting uninstall: h5py
Found existing installation: h5py 2.8.0
Uninstalling h5py-2.8.0:
Successfully uninstalled h5py-2.8.0
Running setup.py install for h5py ... error
ERROR: Command errored out with exit status 1:
command: /home/miranda9/.conda/envs/my_new_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hlwpfooj/install-record.txt --single-version-externally-managed --compile --install-headers /home/miranda9/.conda/envs/my_new_env/include/python3.7m/h5py
...
copying h5py/tests/hl/test_vds/test_lowlevel_vds.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_virtual_source.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
running build_ext
Autodetected HDF5 1.10.2
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.10.2'
MPI Enabled: False
Rebuild Required: True
********************************************************************************
Executing cythonize()
[ 1/22] Cythonizing /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pyx
/tmp/pip-install-bpmeop26/h5py/.eggs/Cython-0.29.21-py3.7.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pxd
...
warning: h5py/api_types_hdf5.pxd:730:6: 'H5Z_ERROR_EDC' redeclared
warning: h5py/api_types_hdf5.pxd:731:6: 'H5Z_DISABLE_EDC' redeclared
warning: h5py/api_types_hdf5.pxd:732:6: 'H5Z_ENABLE_EDC' redeclared
warning: h5py/api_types_hdf5.pxd:733:6: 'H5Z_NO_EDC' redeclared
building 'h5py.defs' extension
creating build/temp.linux-ppc64le-3.7
creating build/temp.linux-ppc64le-3.7/tmp
creating build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26
creating build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26/h5py
creating build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26/h5py/h5py
gcc -pthread -B /home/miranda9/.conda/envs/my_new_env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DH5_USE_16_API -I./h5py -I/tmp/pip-install-bpmeop26/h5py/lzf -I/opt/local/include -I/usr/local/include -I/home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include -I/home/miranda9/.conda/envs/my_new_env/include/python3.7m -c /tmp/pip-install-bpmeop26/h5py/h5py/defs.c -o build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26/h5py/h5py/defs.o
In file included from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830:0,
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/pip-install-bpmeop26/h5py/h5py/api_compat.h:26,
from /tmp/pip-install-bpmeop26/h5py/h5py/defs.c:654:
/home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^
In file included from /tmp/pip-install-bpmeop26/h5py/h5py/defs.c:654:0:
/tmp/pip-install-bpmeop26/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of h5py
Moving to /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/h5py
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/~5py
Moving to /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/h5py-2.8.0-py3.7.egg-info
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/~5py-2.8.0-py3.7.egg-info
ERROR: Command errored out with exit status 1: /home/miranda9/.conda/envs/my_new_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hlwpfooj/install-record.txt --single-version-externally-managed --compile --install-headers /home/miranda9/.conda/envs/my_new_env/include/python3.7m/h5py Check the logs for full command output.
anyone know how I can successfully install a working torchmeta version in a ppc64le (using wmcle 1.7.0)?
related:
gitissue for torchmeta: https://github.com/tristandeleu/pytorch-meta/issues/95
IBM gitissue for torchmeta support: https://github.com/IBM/powerai/issues/269
h5py gitissue for torchmeta: https://github.com/h5py/h5py/issues/1678
IBM h5py support for torchmeta: https://github.com/IBM/powerai/issues/270
Because there are not wheels for powerpc for h5py you are installing h5py from source (from the tarball). This requires both the Python and h5py development headers to be available, see https://docs.h5py.org/en/stable/build.html#source-installation.
Either install h5py from conda or install the required build dependencies.

locust is not installing on my windows 10 for load testing

I tried installing this pip but getting some error, I want this package module for load testing
This is the output i am getting:
Collecting locustio
Collecting geventhttpclient-wheels==1.3.1.dev2 (from locustio)
Using cached https://files.pythonhosted.org/packages/bc/7f/42f8b4ac6c7ddf606fa69769cef2229a159d4af45a294053198f52586095/geventhttpclient-wheels-1.3.1.dev2.tar.gz
Requirement already satisfied: six in c:\users\saurabh\appdata\local\programs\python\python38\lib\site-packages (from geventhttpclient-wheels==1.3.1.dev2->locustio) (1.14.0)
Requirement already satisfied: pycparser in c:\users\saurabh\appdata\local\programs\python\python38\lib\site-packages (from cffi>=1.12.2; platform_python_implementation == "CPython" and sys_platform == "win32"->gevent==20.4.0->locustio) (2.20)
Running setup.py install for geventhttpclient-wheels: started
Running setup.py install for geventhttpclient-wheels: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'"'"'; __file__='"'"'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\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\SauraBh\AppData\Local\Temp\pip-record-ipuoqz4r\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\SauraBh\AppData\Local\Temp\pycharm-packaging\geventhttpclient-wheels\
Complete output (45 lines):
C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\dist.py:471: UserWarning: Normalizing '1.3.1dev2' to '1.3.1.dev2'
warnings.warn(
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\client.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\connectionpool.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\header.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\httplib.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\response.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\url.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\useragent.py -> build\lib.win-amd64-3.8\geventhttpclient
copying src\geventhttpclient\__init__.py -> build\lib.win-amd64-3.8\geventhttpclient
running egg_info
writing src\geventhttpclient_wheels.egg-info\PKG-INFO
writing dependency_links to src\geventhttpclient_wheels.egg-info\dependency_links.txt
writing requirements to src\geventhttpclient_wheels.egg-info\requires.txt
writing top-level names to src\geventhttpclient_wheels.egg-info\top_level.txt
reading manifest file 'src\geventhttpclient_wheels.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'src\geventhttpclient_wheels.egg-info\SOURCES.txt'
creating build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\oncert.pem -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\server.crt -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\server.key -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_client.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_headers.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_httplib.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_keep_alive.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_network_failures.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_no_module_ssl.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_parser.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_ssl.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_url.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
copying src\geventhttpclient\tests\test_useragent.py -> build\lib.win-amd64-3.8\geventhttpclient\tests
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'geventhttpclient._parser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\SauraBh\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\setup.py'"'"'; __file__='"'"'C:\\Users\\SauraBh\\AppData\\Local\\Temp\\pycharm-packaging\\geventhttpclient-wheels\\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\SauraBh\AppData\Local\Temp\pip-record-ipuoqz4r\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I have Microsoft Visual C++ 14.0.25 is installed in my system.
If someone knows any better tool/framework/package for testing api using python please help me. I want to check the registration api with many users at a time.
If Dmitri's suggestion doesnt help, you might want to try this:
pip install -U setuptools
And update to latest locust:
pip install -U locust
(Edit: locust package name is now ”locust”, not ”locustio”)
What you need is not Visual Studio, you need Visual C++ build tools
You can install it using using Visual Studio Installer, you just need to tick the relevant box under the C++ components:
You might also be interested in How to Run Locust with Different Users article

Mysqldb is not installing in flask Application am using pycharm

I am new in flask python development,I tried to use the following command below in Pycharm to enable Mysql usage in my Application, but it's not working :
install Flask-mysqldb
It throws the following information after i enter the command, i dont know if i am missing something , but i already have mysql installed on my computer and i created all my databases but there's no successful installation message anywhere:
Collecting Flask-mysqldb
Collecting mysqlclient (from Flask-mysqldb)
Using cached mysqlclient-1.3.12.tar.gz
Requirement already satisfied: Flask>=0.10 in c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\lib\site-packages (from Flask-mysqldb)
Requirement already satisfied: itsdangerous>=0.21 in c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\lib\site-packages (from Flask>=0.10->Flask-mysqldb)
Requirement already satisfied: click>=2.0 in c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\lib\site-packages (from Flask>=0.10->Flask-mysqldb)
Requirement already satisfied: Werkzeug>=0.7 in c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\lib\site-packages (from Flask>=0.10->Flask-mysqldb)
Requirement already satisfied: Jinja2>=2.4 in c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\lib\site-packages (from Flask>=0.10->Flask-mysqldb)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\lib\site-packages (from Jinja2>=2.4->Flask>=0.10->Flask
-mysqldb)
Building wheels for collected packages: mysqlclient
Running setup.py bdist_wheel for mysqlclient ... error
Complete output from command c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\
huzy_k~1\\appdata\\local\\temp\\pip-build-8jxhwx\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.clos
e();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\huzy_k~1\appdata\local\temp\tmpefdo3cpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
copying _mysql_exceptions.py -> build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-2.7\MySQLdb
creating build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-2.7\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
C:\Users\Huzy_Kamz\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=
(1,3,12,'final',0) -D__version__=1.3.12 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -IC:\Python27\include -Ic:\users\huzy_kamz\pycharmprojec
ts\myfirstflask\venv\PC /Tc_mysql.c /Fobuild\temp.win-amd64-2.7\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Users\\Huzy_Kamz\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit statu
s 2
----------------------------------------
Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient, Flask-mysqldb
Running setup.py install for mysqlclient ... error
Complete output from command c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users
\\huzy_k~1\\appdata\\local\\temp\\pip-build-8jxhwx\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.cl
ose();exec(compile(code, __file__, 'exec'))" install --record c:\users\huzy_k~1\appdata\local\temp\pip-4xug6v-record\install-record.txt --single-version-extern
ally-managed --compile --install-headers c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\include\site\python2.7\mysqlclient:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
copying _mysql_exceptions.py -> build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-2.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-2.7\MySQLdb
creating build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-2.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-2.7\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
C:\Users\Huzy_Kamz\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_inf
o=(1,3,12,'final',0) -D__version__=1.3.12 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -IC:\Python27\include -Ic:\users\huzy_kamz\pycharmproj
ects\myfirstflask\venv\PC /Tc_mysql.c /Fobuild\temp.win-amd64-2.7\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Users\\Huzy_Kamz\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit sta
tus 2
----------------------------------------
Command "c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\huzy_k~1\\appdata\\loc
al\\temp\\pip-build-8jxhwx\\mysqlclient\\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\huzy_k~1\appdata\local\temp\pip-4xug6v-record\install-record.txt --single-version-externally-managed --compile -
-install-headers c:\users\huzy_kamz\pycharmprojects\myfirstflask\venv\include\site\python2.7\mysqlclient" failed with error code 1 in c:\users\huzy_k~1\appdata
\local\temp\pip-build-8jxhwx\mysqlclient\
From where do you run this:
install Flask-mysqldb
?
The nice tool must obtain all needed things by default. If no, try another tool. Try use pip from Miniconda with PyCharm.
Install Miniconda with default options https://conda.io/miniconda.html Create the new PyCharm project (for example 'myproject') and select conda as the environment manager. Just print new relevant paths by your hands, so project folder and environment folder will be created automaticaly, see
Then open Anaconda Prompt from Windows Start Menu.
See
Then run commands:
activate myproject
pip install flask-mysqldb
See
Also, you can install all packages which are needed for your project.
If you do not want use conda instead virtualenv, select virtualenv, but virtualenv from Miniconda, as far as Miniconda is more tested and work out of the box without such errors. You can use your usual python in your old project, and select Miniconda for new project, it is not dangerous. See example of select virtualenv from Miniconda:
In new project open console by hit Ctrl+F12 and run:
pip install flask-mysqldb
Result is next:
Collecting flask-mysqldb
Collecting Flask>=0.10 (from flask-mysqldb)
Using cached Flask-0.12.2-py2.py3-none-any.whl
Collecting mysqlclient (from flask-mysqldb)
Using cached mysqlclient-1.3.12-cp36-cp36m-win_amd64.whl
Collecting Werkzeug>=0.7 (from Flask>=0.10->flask-mysqldb)
Using cached Werkzeug-0.14.1-py2.py3-none-any.whl
Collecting Jinja2>=2.4 (from Flask>=0.10->flask-mysqldb)
Using cached Jinja2-2.10-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from Flask>=0.10->flask-mysqldb)
Collecting click>=2.0 (from Flask>=0.10->flask-mysqldb)
Using cached click-6.7-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->Flask>=0.10->flask-mysqldb)
Installing collected packages: Werkzeug, MarkupSafe, Jinja2, itsdangerous, click, Flask, mysqlclient, flask-mysqldb
Successfully installed Flask-0.12.2 Jinja2-2.10 MarkupSafe-1.0 Werkzeug-0.14.1 click-6.7 flask-mysqldb-0.2.0 itsdangerous-0.24 mysqlclient-1.3.12

Python: installing a module successfully but it is not available via import

I'm using Jupyter Notebook and I want to import an external toolbox called bluepyopt. As it currently only runs in Python 2.7, I set up a Python 2.7 Kernel as described here. So I can change my kernel to python 2 in Jupyter Notebook.
If I want to import the module using
import bluepyopt as bpop
I get the error
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-83e46e18aae9> in <module>()
3
4 # to create electrical cell models
----> 5 import bluepyopt as bpop
6 import bluepyopt.ephys as ephys
7
ModuleNotFoundError: No module named 'bluepyopt'
I install bluepyopt the way I usually install modules with
!pip install bluepyopt
This also gives me an unsual super loooooong output. I don't know what is important here, so I will post all of it just to be sure. This only occurs in python 2.7 however, in python 3 everything works fine! Any idea why it is like that?
Collecting bluepyopt
Collecting efel>=2.11 (from bluepyopt)
Using cached efel-2.12.11.tar.gz
Collecting ipyparallel (from bluepyopt)
Using cached ipyparallel-6.0.2-py2.py3-none-any.whl
Requirement already satisfied: Jinja2>=2.8 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Requirement already satisfied: pickleshare>=0.7.3 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Requirement already satisfied: numpy>=1.6 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Collecting scoop>=0.7 (from bluepyopt)
Requirement already satisfied: pandas>=0.18 in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Collecting future (from bluepyopt)
Requirement already satisfied: deap in c:\users\alex\anaconda3\lib\site-packages (from bluepyopt)
Requirement already satisfied: six in c:\users\alex\anaconda3\lib\site-packages (from efel>=2.11->bluepyopt)
Requirement already satisfied: ipython>=4 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: ipykernel in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: pyzmq>=13 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: tornado>=4 in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: ipython-genutils in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: jupyter-client in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: decorator in c:\users\alex\anaconda3\lib\site-packages (from ipyparallel->bluepyopt)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\alex\anaconda3\lib\site-packages (from Jinja2>=2.8->bluepyopt)
Requirement already satisfied: greenlet>=0.3.4 in c:\users\alex\anaconda3\lib\site-packages (from scoop>=0.7->bluepyopt)
Collecting argparse>=1.1 (from scoop>=0.7->bluepyopt)
Using cached argparse-1.4.0-py2.py3-none-any.whl
Requirement already satisfied: pytz>=2011k in c:\users\alex\anaconda3\lib\site-packages (from pandas>=0.18->bluepyopt)
Building wheels for collected packages: efel
Running setup.py bdist_wheel for efel: started
Running setup.py bdist_wheel for efel: finished with status 'error'
Complete output from command C:\Users\Alex\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-cygqwlch\\efel\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Alex\AppData\Local\Temp\tmp5k5lqwx6pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\efel
copying efel\api.py -> build\lib.win-amd64-3.6\efel
copying efel\io.py -> build\lib.win-amd64-3.6\efel
copying efel\settings.py -> build\lib.win-amd64-3.6\efel
copying efel\_version.py -> build\lib.win-amd64-3.6\efel
copying efel\__init__.py -> build\lib.win-amd64-3.6\efel
copying efel\DependencyV5.txt -> build\lib.win-amd64-3.6\efel
creating build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Utils.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV1.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV2.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV3.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV4.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV5.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\FillFptrTable.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\DependencyTree.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\efel.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\cfeature.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Global.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\mapoperations.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\types.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\eFELLogger.h -> build\lib.win-amd64-3.6\efel\cppcore
UPDATING build\lib.win-amd64-3.6\efel/_version.py
set build\lib.win-amd64-3.6\efel/_version.py to '2.12.11'
running build_ext
building 'efel.cppcore' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Running setup.py clean for efel
Failed to build efel
Installing collected packages: efel, ipyparallel, argparse, scoop, future, bluepyopt
Running setup.py install for efel: started
Running setup.py install for efel: finished with status 'error'
Complete output from command C:\Users\Alex\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-cygqwlch\\efel\\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\Alex\AppData\Local\Temp\pip-n69ud86n-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\efel
copying efel\api.py -> build\lib.win-amd64-3.6\efel
copying efel\io.py -> build\lib.win-amd64-3.6\efel
copying efel\settings.py -> build\lib.win-amd64-3.6\efel
copying efel\_version.py -> build\lib.win-amd64-3.6\efel
copying efel\__init__.py -> build\lib.win-amd64-3.6\efel
copying efel\DependencyV5.txt -> build\lib.win-amd64-3.6\efel
creating build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Utils.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV1.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV2.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV3.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV4.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\LibV5.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\FillFptrTable.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\DependencyTree.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\efel.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\cfeature.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\Global.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\mapoperations.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\types.h -> build\lib.win-amd64-3.6\efel\cppcore
copying efel\cppcore\eFELLogger.h -> build\lib.win-amd64-3.6\efel\cppcore
UPDATING build\lib.win-amd64-3.6\efel/_version.py
set build\lib.win-amd64-3.6\efel/_version.py to '2.12.11'
running build_ext
building 'efel.cppcore' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for efel
Command "C:\Users\Alex\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-cygqwlch\\efel\\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\Alex\AppData\Local\Temp\pip-n69ud86n-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Alex\AppData\Local\Temp\pip-build-cygqwlch\efel\
Requirement already satisfied: NEURON in c:\users\alex\anaconda3\lib\site-packages
Some more maybe useful information when using the python 2 kernel in Jupyter Notebook:
In [1]:
import sys
sys.executable
Out [1]:
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\python.exe' #kernel python 2.7
'C:\\Users\\Alex\\Anaconda3\\python.exe' #kernel python 3
In [2]:
from jupyter_core.paths import jupyter_data_dir
print(jupyter_data_dir())
Out[2]:
C:\Users\Alex\AppData\Roaming\jupyter
In[3]:
sys.path
Out[3]:
['',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\python27.zip',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\DLLs',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\plat-win',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\lib-tk',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\site-packages',
'C:\\Users\\Alex\\Anaconda3\\envs\\ipykernel_py2\\lib\\site-packages\\IPython\\extensions',
'C:\\Users\\Alex\\.ipython']
In[4]:
!jupyter kernelspec list
Out[4]:
Available kernels:
python3 C:\Users\Alex\Anaconda3\share\jupyter\kernels\python3
python2 C:\ProgramData\jupyter\kernels\python2
As i can see the module is not properly installed and giving dependency for Microsoft Visual C++ 14.0.
Try to install Microsoft Visual C++ build tools from this link http://landinghub.visualstudio.com/visual-cpp-build-tools
Then try installing the module using pip again
pip install bluepyopt

Errors in pip install flask-socketio

I am trying to install flask-socketio from terminal
pip install flask-socketio
but it keep showing me the following error(in bold):
Collecting flask-socketio
Using cached Flask-SocketIO-2.9.2.tar.gz
Requirement already satisfied: Flask>=0.9 in /Library/Python/2.7/site-packages (from flask-socketio)
Collecting python-socketio>=1.5.0 (from flask-socketio)
Using cached python-socketio-1.8.0.tar.gz
Collecting python-engineio>=1.0.0 (from flask-socketio)
Using cached python-engineio-1.7.0.tar.gz
Requirement already satisfied: itsdangerous>=0.21 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: Werkzeug>=0.7 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: Jinja2>=2.4 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: click>=2.0 in /Library/Python/2.7/site-packages (from Flask>=0.9->flask-socketio)
Requirement already satisfied: six>=1.9.0 in /Library/Python/2.7/site-packages (from python-socketio>=1.5.0->flask-socketio)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from Jinja2>=2.4->Flask>=0.9->flask-socketio)
Installing collected packages: python-engineio, python-socketio, flask-socketio
Running setup.py install for python-engineio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-build-1eGNas/python-engineio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-U9szix-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/engineio
copying engineio/__init__.py -> build/lib/engineio
copying engineio/async_aiohttp.py -> build/lib/engineio
copying engineio/async_eventlet.py -> build/lib/engineio
copying engineio/async_gevent.py -> build/lib/engineio
copying engineio/async_gevent_uwsgi.py -> build/lib/engineio
copying engineio/async_sanic.py -> build/lib/engineio
copying engineio/async_threading.py -> build/lib/engineio
copying engineio/asyncio_server.py -> build/lib/engineio
copying engineio/asyncio_socket.py -> build/lib/engineio
copying engineio/exceptions.py -> build/lib/engineio
copying engineio/middleware.py -> build/lib/engineio
copying engineio/packet.py -> build/lib/engineio
copying engineio/payload.py -> build/lib/engineio
copying engineio/server.py -> build/lib/engineio
copying engineio/socket.py -> build/lib/engineio
running egg_info
writing requirements to python_engineio.egg-info/requires.txt
writing python_engineio.egg-info/PKG-INFO
writing top-level names to python_engineio.egg-info/top_level.txt
writing dependency_links to python_engineio.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'python_engineio.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.md'
writing manifest file 'python_engineio.egg-info/SOURCES.txt'
running install_lib
creating /Library/Python/2.7/site-packages/engineio
error: could not create '/Library/Python/2.7/site-packages/engineio': Permission denied
----------------------------------------
**Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-build-1eGNas/python-engineio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-U9szix-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_g/m9lwl1yn5g5_wz3d57qc1qh40000gn/T/pip-build-1eGNas/python-engineio/**
I have tried updating my pip and basically went through mostly all related questions in stackoverflow but I am getting permission denied and its asking me to import some setup tools.
If you want to install something to system python libs, try sudo pip install flask-socketio. Or use virtualenv

Categories