Skip to content
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
@zefciu

Description

@zefciu

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/```

Activity

tuky

tuky commented on Jul 4, 2018

@tuky

I can confirm this issue and many others out there seem to have been fixed, e.g. numpy/numpy#10500

beaugunderson

beaugunderson commented on Jul 5, 2018

@beaugunderson

also confirming that PyPi installation fails but

pip install Cython git+https://github.com/rkern/line_profiler.git

succeeds

scoder

scoder commented on Aug 10, 2018

@scoder

@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

kawing-chiu commented on Aug 31, 2018

@kawing-chiu

Same issue here. Cannot install line_profiler for python 3.7.

meownoid

meownoid commented on Nov 12, 2018

@meownoid

Same issue.

phewdry

phewdry commented on Nov 30, 2018

@phewdry

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?):
screen shot 2018-11-30 at 1 55 57 pm

sudo pip3 install Cython git+https://github.com/rkern/line_profiler.git
returns this error:
screen shot 2018-11-30 at 1 58 04 pm

holmrenser

holmrenser commented on Feb 7, 2019

@holmrenser

This still happens

simonpercivall

simonpercivall commented on Feb 7, 2019

@simonpercivall

A bad solution, I know, but I've published a package lp37 on PyPI to solve this issue.

ngoldbaum

ngoldbaum commented on Feb 7, 2019

@ngoldbaum

Please do a release on pypi pretty please

added
being consideredActively being investigated by maintainers for merging
on Feb 8, 2019
caethan

caethan commented on Feb 8, 2019

@caethan
Collaborator

Sorry folks, new baby has been limiting my time. Going to try to get these major fixes in but no guarantees on timing.

miozus

miozus commented on Feb 13, 2019

@miozus

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

Requirement already satisfied: line_profiler in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (2.1.1)
Requirement already satisfied: IPython>=0.13 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from line_profiler) (7.2.0)
Requirement already satisfied: appnope; sys_platform == "darwin" in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (0.1.0)
Requirement already satisfied: jedi>=0.10 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (0.13.1)
Requirement already satisfied: pickleshare in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (0.7.4)
Requirement already satisfied: pexpect; sys_platform != "win32" in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (4.6.0)
Requirement already satisfied: traitlets>=4.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (4.3.2)
Requirement already satisfied: setuptools>=18.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (40.6.2)
Requirement already satisfied: pygments in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (2.2.0)
Requirement already satisfied: backcall in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (0.1.0)
Requirement already satisfied: decorator in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (4.3.0)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from IPython>=0.13->line_profiler) (2.0.7)
Requirement already satisfied: parso>=0.3.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from jedi>=0.10->IPython>=0.13->line_profiler) (0.3.1)
Requirement already satisfied: ptyprocess>=0.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->IPython>=0.13->line_profiler) (0.6.0)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from traitlets>=4.2->IPython>=0.13->line_profiler) (1.11.0)
Requirement already satisfied: ipython-genutils in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from traitlets>=4.2->IPython>=0.13->line_profiler) (0.2.0)
Requirement already satisfied: wcwidth in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->IPython>=0.13->line_profiler) (0.1.7)

thx @beaugunderson @ChanForPres

psteinb

psteinb commented on Feb 15, 2019

@psteinb

I can confirm, from fc29 and python3.7.2, I did:

$ pip3 install --user Cython git+https://github.com/rkern/line_profiler.git

And that works flawlessly so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    being consideredActively being investigated by maintainers for merging

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @beaugunderson@zefciu@simonpercivall@scoder@psteinb

        Issue actions

          Build from pypi fails for Python3.7 · Issue #127 · rkern/line_profiler