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

PEP 517 error during buiding wheel for line-profiler #28

Open
amrbibars opened this issue Sep 11, 2020 · 13 comments
Open

PEP 517 error during buiding wheel for line-profiler #28

amrbibars opened this issue Sep 11, 2020 · 13 comments

Comments

@amrbibars
Copy link

I got this error when I tried to install line-profiler noting that I am using python 3.7 64bit, I already have Microsoft VS 2019 with Build tools installed, tired to install the package from VS environment (using developers CMD), also tried using pip3 and with updated setup tools and wheel.

ERROR: Command errored out with exit status 1:
command: 'C:\Users\amr.bibars\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' 'C:\Users\amr.bibars\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip_vendor\pep517_in_process.py' build_wheel 'C:\Users\AMR1.BIB\AppData\Local\Temp\tmpkroi0lir'
cwd: C:\Users\AMR
1.BIB\AppData\Local\Temp\pip-install-4cvnpdgm\line-profiler
Complete output (162 lines):
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator

  Visual Studio 15 2017 Win64

could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred!
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:

  cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line.  This environment is
unable to invoke the cl compiler.  To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:

  cl

is not a full path and was not found in the PATH.

To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line.  This environment is
unable to invoke the cl compiler.  To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/amr.bibars/AppData/Local/Temp/pip-install-4cvnpdgm/line-profiler/_cmake_test_compile/build/CMakeFiles/CMakeError.log".


-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator






--







-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator - failure


-- Trying "Visual Studio 15 2017 Win64 v141" generator






--







-- Trying "Visual Studio 15 2017 Win64 v141" generator - failure


-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator






--







-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator - failure


-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator






--







-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator - failure


scikit-build could not get a working generator for your system. Aborting build.

Building windows wheels for Python 3.7 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":

https://visualstudio.microsoft.com/vs/


ERROR: Failed building wheel for line-profiler
Failed to build line-profiler
ERROR: Could not build wheels for line-profiler which use PEP 517 and cannot be installed directly

@tan-wei
Copy link

tan-wei commented Sep 20, 2020

Same issue for me with Python 3.8.5 64bit and MSVC 2019. From my error messages, I think the error is raised from Cython.

@tan-wei
Copy link

tan-wei commented Sep 20, 2020

Here is my log:

>_ pip install line_profiler
Collecting line_profiler
  Downloading line_profiler-3.0.2.tar.gz (45 kB)
     |████████████████████████████████| 45 kB 20 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: IPython in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from line_profiler) (7.17.0)
Requirement already satisfied: traitlets>=4.2 in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (4.3.3)
Requirement already satisfied: pygments in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (2.6.1)
Requirement already satisfied: pickleshare in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (0.7.5)
Requirement already satisfied: setuptools>=18.5 in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (49.6.0)
Requirement already satisfied: colorama; sys_platform == "win32" in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (0.4.3)
Requirement already satisfied: decorator in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (4.4.2)
Requirement already satisfied: backcall in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (0.2.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (3.0.6)
Requirement already satisfied: jedi>=0.10 in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from IPython->line_profiler) (0.17.2)
Requirement already satisfied: six in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from traitlets>=4.2->IPython->line_profiler) (1.15.0)
Requirement already satisfied: ipython-genutils in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from traitlets>=4.2->IPython->line_profiler) (0.2.0)
Requirement already satisfied: wcwidth in c:\programdata\scoop\apps\python\3.8.5\lib\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->IPython->line_profiler) (0.2.5)
Collecting parso<0.8.0,>=0.7.0
  Using cached parso-0.7.1-py2.py3-none-any.whl (109 kB)
Building wheels for collected packages: line-profiler
  Building wheel for line-profiler (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\programdata\scoop\apps\python\current\python.exe' 'c:\programdata\scoop\apps\python\current\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\WINTER~1\AppData\Local\Temp\tmp46rygmgz'
       cwd: C:\Users\Winterreise\AppData\Local\Temp\pip-install-3t21573p\line-profiler
  Complete output (88 lines):
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 8.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/ProgramData/scoop/apps/perl/current/c/bin/gcc.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 8.3.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/ProgramData/scoop/apps/perl/current/c/bin/c++.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/Winterreise/AppData/Local/Temp/pip-install-3t21573p/line-profiler/_cmake_test_compile/build
  -- The C compiler identification is GNU 8.3.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/ProgramData/scoop/apps/perl/current/c/bin/gcc.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Found PythonInterp: c:/programdata/scoop/apps/python/current/python.exe (found version "3.8.5")
  -- Found Cython: C:/Users/Winterreise/AppData/Local/Temp/pip-build-env-jy0p48wt/overlay/Scripts/cython.exe
  -- Found PythonLibs: c:/programdata/scoop/apps/python/current/libs/python38.lib (found version "3.8.5")
  -- [OURS] sources = C:/Users/Winterreise/AppData/Local/Temp/pip-install-3t21573p/line-profiler/_skbuild/win-amd64-3.8/cmake-build/line_profiler/_line_profiler.c;C:/Users/Winterreise/AppData/Local/Temp/pip-install-3t21573p/line-profiler/line_profiler/unset_trace.c;C:/Users/Winterreise/AppData/Local/Temp/pip-install-3t21573p/line-profiler/line_profiler/timers.c
  -- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Failed
  -- Performing Test Weak Link MODULE -> SHARED (osx_dynamic_lookup) - Failed
  -- Performing Test Weak Link MODULE -> SHARED (no_flag) - Failed
  _modinit_prefix:PyInit_
  -- [OURS] _install_dest = line_profiler
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/Winterreise/AppData/Local/Temp/pip-install-3t21573p/line-profiler/_skbuild/win-amd64-3.8/cmake-build
  [1/6] Generating C source line_profiler/_line_profiler.c
  [2/6] Building C object line_profiler/CMakeFiles/_line_profiler.dir/unset_trace.c.obj
  [3/6] Building C object line_profiler/CMakeFiles/_line_profiler.dir/_line_profiler.c.obj
  FAILED: line_profiler/CMakeFiles/_line_profiler.dir/_line_profiler.c.obj
  C:\ProgramData\scoop\apps\perl\current\c\bin\gcc.exe -D_line_profiler_EXPORTS -Ic:/programdata/scoop/apps/python/current/Include -I../../../line_profiler -O3 -DNDEBUG -MD -MT line_profiler/CMakeFiles/_line_profiler.dir/_line_profiler.c.obj -MF line_profiler\CMakeFiles\_line_profiler.dir\_line_profiler.c.obj.d -o line_profiler/CMakeFiles/_line_profiler.dir/_line_profiler.c.obj -c line_profiler/_line_profiler.c
  line_profiler/_line_profiler.c:201:41: warning: division by zero [-Wdiv-by-zero]
       enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
                                           ^
  line_profiler/_line_profiler.c:201:12: error: enumerator value for '__pyx_check_sizeof_voidp' is not an integer constant
       enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
              ^~~~~~~~~~~~~~~~~~~~~~~~
  [4/6] Building C object line_profiler/CMakeFiles/_line_profiler.dir/timers.c.obj
  ninja: build stopped: subcommand failed.
    File "C:\Users\Winterreise\AppData\Local\Temp\pip-build-env-jy0p48wt\overlay\Lib\site-packages\skbuild\setuptools_wrap.py", line 589, in setup
      cmkr.make(make_args, env=env)
    File "C:\Users\Winterreise\AppData\Local\Temp\pip-build-env-jy0p48wt\overlay\Lib\site-packages\skbuild\cmaker.py", line 496, in make
      raise SKBuildError(


  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      C:\Users\Winterreise\AppData\Local\Temp\pip-install-3t21573p\line-profiler\_skbuild\win-amd64-3.8\cmake-build
    Command:
      cmake 'C:\Users\Winterreise\AppData\Local\Temp\pip-install-3t21573p\line-profiler' -G Ninja '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\Winterreise\AppData\Local\Temp\pip-install-3t21573p\line-profiler\_skbuild\win-amd64-3.8\cmake-install' '-DPYTHON_EXECUTABLE:FILEPATH=c:\programdata\scoop\apps\python\current\python.exe' -DPYTHON_VERSION_STRING:STRING=3.8.5 '-DPYTHON_INCLUDE_DIR:PATH=c:\programdata\scoop\apps\python\current\Include' '-DPYTHON_LIBRARY:FILEPATH=c:\programdata\scoop\apps\python\current\libs\python38.lib' -DSKBUILD:BOOL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\Winterreise\AppData\Local\Temp\pip-build-env-jy0p48wt\overlay\Lib\site-packages\skbuild\resources\cmake' -DCMAKE_BUILD_TYPE:STRING=Release

  Traceback (most recent call last):

  An error occurred while building with CMake.
    Command:
      cmake --build . --target install --config Release --
    Source directory:
      C:\Users\Winterreise\AppData\Local\Temp\pip-install-3t21573p\line-profiler
    Working directory:
      C:\Users\Winterreise\AppData\Local\Temp\pip-install-3t21573p\line-profiler\_skbuild\win-amd64-3.8\cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for line-profiler
Failed to build line-profiler
ERROR: Could not build wheels for line-profiler which use PEP 517 and cannot be installed directly

@tan-wei
Copy link

tan-wei commented Sep 20, 2020

We can see related information here. Maybe, some flags should be added with MSVC:

python setup.py build_ext --inplace - DMS_WIN64

@shouldsee
Copy link

In case anyone is looking for wheels, you find it on https://www.lfd.uci.edu/~gohlke/pythonlibs/#line_profiler

e.g. for 64bit windows python3.7, install with

python3 -m pip install line-profiler@https://download.lfd.uci.edu/pythonlibs/x2tqcw5k/line_profiler-3.0.2-cp37-cp37m-win_amd64.whl

@neomatrix369
Copy link

neomatrix369 commented Nov 1, 2020

@hbaniecki
Copy link

hbaniecki commented Nov 1, 2020

What worked for me with Python 3.8 :
pip install line_profiler@https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.0.2-cp38-cp38-win_amd64.whl

other urls: https://pypi.bartbroe.re/line_profiler/

Edit: Also Python 3.8.5 64bit and MSVC 2019.

@Erotemic
Copy link
Member

Erotemic commented Nov 1, 2020

Is this error something that should be resolved within this repo? Or is this an external issue?

@blyind
Copy link

blyind commented Nov 14, 2020

worked with python 3.9 using
pip install line_profiler@https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl
I was about to give up so thanks for the answer @shouldsee

@masip85
Copy link

masip85 commented Jan 24, 2021

same issue with python 3.8 at arm64. With pip I get:

ERROR: Could not build wheels for ninja which use PEP 517 and cannot be installed directly

Building wheels for collected packages: ninja
#7 98.06 Building wheel for ninja (PEP 517): started
#7 98.06 Building wheel for ninja (PEP 517): finished with status 'error'
...
#7 98.06 ERROR: Could not build wheels for ninja which use PEP 517 and cannot be installed directly

@mariohuq
Copy link

pip install line_profiler@https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl

For me it does:

  ERROR: HTTP error 404 while getting https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl
ERROR: Could not install requirement line_profiler@ https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl from 
https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl because of HTTP error 404 Client Error: Not Found for url: https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl for URL https://download.lfd.uci.edu/pythonlibs/z2tqcw5k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl

Windows 10 x64, VS 2019, python 3.9.2

@mariohuq
Copy link

mariohuq commented Mar 28, 2021

worked with python 3.9 using pip install line_profiler@https://download.lfd.uci.edu/pythonlibs/w4tscw6k/line_profiler-3.1.0-cp39-cp39-win_amd64.whl

@alexbprofit
Copy link

image

@Erotemic
Copy link
Member

I think we need to wait until the scikit-build issue is resolved: scikit-build/scikit-build#124

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

No branches or pull requests

10 participants