New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation problem #5
Comments
That’s a weird error.
Also, if you're running this in a virtual environment, did you install basic packages like |
Yes, Yes, and Yes. n32.whl
|
Well, the issue is that for some reason the compiler cannot find Python’s C headers. It’s not really related to this package as you’ll experience the same error if e.g. you try to run MCMC samplers from For MSVC by the way you specifically need to install the The solutions I see are:
|
I've now run into this issue when using linux with a python install from system repositories. The solution is to install system packages named like |
Hi David, how are you? I hope you are well.
I tried to install the library but I got this error:
Collecting costsensitive
Using cached https://files.pythonhosted.org/packages/08/01/9d8a0c5c07db31ba8b17ccc0506db0d899ef342a9a57fa937b9b8b01c066/costsensitive-0.1.2.10.tar.gz
Requirement already up-to-date: cython in /home/notebooks/venv/lib/python3.6/site-packages (from costsensitive)
Requirement already up-to-date: joblib>=0.13 in /home/notebooks/venv/lib/python3.6/site-packages (from costsensitive)
Collecting numpy (from costsensitive)
Downloading https://files.pythonhosted.org/packages/19/b9/bda9781f0a74b90ebd2e046fde1196182900bd4a8e1ea503d3ffebc50e7c/numpy-1.17.0-cp36-cp36m-manylinux1_x86_64.whl (20.4MB)
100% |████████████████████████████████| 20.4MB 96kB/s s eta 0:00:01
Requirement already up-to-date: scipy in /home/notebooks/venv/lib/python3.6/site-packages (from costsensitive)
Building wheels for collected packages: costsensitive
Running setup.py bdist_wheel for costsensitive ... error
Complete output from command /home/notebooks/venv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-652t1zkx/costsensitive/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/tmp6frkpu00pip-wheel- --python-tag cp36:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
Failed building wheel for costsensitive
Running setup.py clean for costsensitive
Failed to build costsensitive
Installing collected packages: numpy, costsensitive
Found existing installation: numpy 1.16.4
Uninstalling numpy-1.16.4:
Successfully uninstalled numpy-1.16.4
Running setup.py install for costsensitive ... error
Complete output from command /home/notebooks/venv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-652t1zkx/costsensitive/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-08s1e5tx-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/notebooks/venv/include/site/python3.6/costsensitive:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/costsensitive
copying costsensitive/init.py -> build/lib.linux-x86_64-3.6/costsensitive
running build_ext
cythoning costsensitive/vwrapper.pyx to costsensitive/vwrapper.c
/home/notebooks/venv/lib/python3.6/site-packages/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-build-652t1zkx/costsensitive/costsensitive/vwrapper.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'costsensitive._vwrapper' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/costsensitive
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/notebooks/venv/lib/python3.6/site-packages/numpy/core/include -I/home/notebooks/venv/include -I/usr/include/python3.6m -c costsensitive/vwrapper.c -o build/temp.linux-x86_64-3.6/costsensitive/vwrapper.o -O2 -march=native -std=c99 -fopenmp
costsensitive/vwrapper.c:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Command "/home/notebooks/venv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-652t1zkx/costsensitive/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-08s1e5tx-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/notebooks/venv/include/site/python3.6/costsensitive" failed with error code 1 in /tmp/pip-build-652t1zkx/costsensitive/
The text was updated successfully, but these errors were encountered: