Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

pip instalation #160

Open
raminrasoulinezhad opened this issue Jun 13, 2019 · 1 comment
Open

pip instalation #160

raminrasoulinezhad opened this issue Jun 13, 2019 · 1 comment

Comments

@raminrasoulinezhad
Copy link

raminrasoulinezhad commented Jun 13, 2019

I can not install the library using pip.

command: pip install line_profiler

Collecting line_profiler
Using cached https://files.pythonhosted.org/packages/14/fc/ecf4e238bb601ff829068e5a72cd1bd67b0ee0ae379db172eb6a0779c6b6/line_profiler-2.1.2.tar.gz
Requirement already satisfied: IPython>=0.13 in ./numba/lib/python3.6/site-packages (from line_profiler) (7.5.0)
Requirement already satisfied: traitlets>=4.2 in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (4.3.2)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (2.0.9)
Requirement already satisfied: pickleshare in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (0.7.5)
Requirement already satisfied: backcall in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (0.1.0)
Requirement already satisfied: pexpect; sys_platform != "win32" in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (4.7.0)
Requirement already satisfied: setuptools>=18.5 in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (41.0.1)
Requirement already satisfied: jedi>=0.10 in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (0.13.3)
Requirement already satisfied: pygments in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (2.4.2)
Requirement already satisfied: decorator in ./numba/lib/python3.6/site-packages (from IPython>=0.13->line_profiler) (4.4.0)
Requirement already satisfied: six in ./numba/lib/python3.6/site-packages (from traitlets>=4.2->IPython>=0.13->line_profiler) (1.12.0)
Requirement already satisfied: ipython-genutils in ./numba/lib/python3.6/site-packages (from traitlets>=4.2->IPython>=0.13->line_profiler) (0.2.0)
Requirement already satisfied: wcwidth in ./numba/lib/python3.6/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->IPython>=0.13->line_profiler) (0.1.7)
Requirement already satisfied: ptyprocess>=0.5 in ./numba/lib/python3.6/site-packages (from pexpect; sys_platform != "win32"->IPython>=0.13->line_profiler) (0.6.0)
Requirement already satisfied: parso>=0.3.0 in ./numba/lib/python3.6/site-packages (from jedi>=0.10->IPython>=0.13->line_profiler) (0.4.0)
Building wheels for collected packages: line-profiler
Building wheel for line-profiler (setup.py) ... error
ERROR: Complete output from command /home/ramin/numba/numba/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-cvbav25u/line-profiler/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-zkgyf4bi --python-tag cp36:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying line_profiler.py -> build/lib.linux-x86_64-3.6
copying kernprof.py -> build/lib.linux-x86_64-3.6
copying line_profiler_py35.py -> build/lib.linux-x86_64-3.6
running build_ext
skipping '_line_profiler.c' Cython extension (up-to-date)
building '_line_profiler' extension
creating build/temp.linux-x86_64-3.6
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/usr/include/python3.6m -I/home/ramin/numba/numba/include/python3.6m -c _line_profiler.c -o build/temp.linux-x86_64-3.6/_line_profiler.o
_line_profiler.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

ERROR: Failed building wheel for line-profiler
Running setup.py clean for line-profiler
Failed to build line-profiler
Installing collected packages: line-profiler
Running setup.py install for line-profiler ... error
ERROR: Complete output from command /home/ramin/numba/numba/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-cvbav25u/line-profiler/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-kr5c48ls/install-record.txt --single-version-externally-managed --compile --install-headers /home/ramin/numba/numba/include/site/python3.6/line-profiler:
ERROR: running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying line_profiler.py -> build/lib.linux-x86_64-3.6
copying kernprof.py -> build/lib.linux-x86_64-3.6
copying line_profiler_py35.py -> build/lib.linux-x86_64-3.6
running build_ext
skipping '_line_profiler.c' Cython extension (up-to-date)
building '_line_profiler' extension
creating build/temp.linux-x86_64-3.6
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/usr/include/python3.6m -I/home/ramin/numba/numba/include/python3.6m -c _line_profiler.c -o build/temp.linux-x86_64-3.6/_line_profiler.o
_line_profiler.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
----------------------------------------
ERROR: Command "/home/ramin/numba/numba/bin/python3 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-cvbav25u/line-profiler/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-kr5c48ls/install-record.txt --single-version-externally-managed --compile --install-headers /home/ramin/numba/numba/include/site/python3.6/line-profiler" failed with error code 1 in /tmp/pip-install-cvbav25u/line-profiler/

@Hanaasagi
Copy link

Hanaasagi commented Jun 17, 2019

@raminrasoulinezhad

From the error message

_line_profiler.c:4:10: fatal error: Python.h: No such file or directory

Maybe you can find the solution here https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants