This repository was archived by the owner on Jun 9, 2020. It is now read-only.
This repository was archived by the owner on Jun 9, 2020. It is now read-only.
Build from pypi fails for Python3.7 #127
Open
Description
While it is possible to install line_profiler from source, installing it from PyPI fails. Probably a separate distribution for this version should be created. Message from pip:
_line_profiler.c: In function ‘__Pyx__ExceptionSave’:
_line_profiler.c:7890:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
*type = tstate->exc_type;
^
_line_profiler.c:7891:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
*value = tstate->exc_value;
^
_line_profiler.c:7892:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
*tb = tstate->exc_traceback;
^
_line_profiler.c: In function ‘__Pyx__ExceptionReset’:
_line_profiler.c:7899:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
_line_profiler.c:7900:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
_line_profiler.c:7901:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
_line_profiler.c:7902:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
_line_profiler.c:7903:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
_line_profiler.c:7904:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
_line_profiler.c: In function ‘__Pyx__GetException’:
_line_profiler.c:7959:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
_line_profiler.c:7960:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
_line_profiler.c:7961:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
_line_profiler.c:7962:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
_line_profiler.c:7963:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
_line_profiler.c:7964:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of line-profiler
Command "/home/zefciu/.virtualenvs/lp/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2y3fjp4e/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-1x7yigjj/install-record.txt --single-version-externally-managed --compile --install-headers /home/zefciu/.virtualenvs/lp/include/site/python3.7/line-profiler" failed with error code 1 in /tmp/pip-install-2y3fjp4e/line-profiler/```
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
tuky commentedon Jul 4, 2018
I can confirm this issue and many others out there seem to have been fixed, e.g. numpy/numpy#10500
beaugunderson commentedon Jul 5, 2018
also confirming that PyPi installation fails but
succeeds
scoder commentedon Aug 10, 2018
@rkern, would be nice to rebuild the existing sources with a recent Cython version and deploy it as a fix release to pypi. Also see the test fix in #129.
kawing-chiu commentedon Aug 31, 2018
Same issue here. Cannot install line_profiler for python 3.7.
meownoid commentedon Nov 12, 2018
Same issue.
phewdry commentedon Nov 30, 2018
is cython required for line profiler? seems memory profiler is fine w/o afaik.
Context: using in jupyter notebook/ipython environment (Mac OS Mojave)
Note: Doesn't seem ipython is even compatible w/ 3.7 yet. How are you guys using lineprofiler?
Update:

pip3 install line_profiler
returns this error (Is this related to Cython or solely from lineprofiler?):
sudo pip3 install Cython git+https://github.com/rkern/line_profiler.git
returns this error:
fix travis, visit rkern/line_profiler#127
[REF] odoo-shippable: Remove line-profiler because of rkern/line_prof…
[REF] odoo-shippable: Install postgreql 11 and more (#333)
holmrenser commentedon Feb 7, 2019
This still happens
simonpercivall commentedon Feb 7, 2019
A bad solution, I know, but I've published a package
lp37
on PyPI to solve this issue.ngoldbaum commentedon Feb 7, 2019
Please do a release on pypi pretty please
caethan commentedon Feb 8, 2019
Sorry folks, new baby has been limiting my time. Going to try to get these major fixes in but no guarantees on timing.
miozus commentedon Feb 13, 2019
I have met this question tonight and cried until now, but it resolved by:
pip install cython
then
sudo pip3 install Cython git+https://github.com/rkern/line_profiler.git
lets have a look
pip install line_profiler
thx @beaugunderson @ChanForPres
psteinb commentedon Feb 15, 2019
I can confirm, from fc29 and python3.7.2, I did:
And that works flawlessly so far.