Python Forum
Got problem intalling pynumpress
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Got problem intalling pynumpress
#1
Hi Everyone,

I am a rookie in both coding and python. I got some problem while trying to install some python repository from GitHub. I find out problem comes from installing pynumpress. Could someone help to see what the problem is please? I am sure I have already installed pynum, wheel and visual studio 2019. But it still gives 'failed building wheel for pynumpress' and 'command error out with exit status 1'. Below is the entile infomation from CMD window. Thank you very much in advance.

C:\Users\weant>python -m pip install pynumpress
Collecting pynumpress
Using cached pynumpress-0.0.5.tar.gz (110 kB)
Requirement already satisfied: numpy in c:\users\weant\appdata\roaming\python\python38\site-packages (from pynumpress) (1.19.2)
Building wheels for collected packages: pynumpress
Building wheel for pynumpress (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\weant\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"'; file='"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\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 'C:\Users\weant\AppData\Local\Temp\pip-wheel-9kizjgp0'
cwd: C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pynumpress
copying pynumpress__init__.py -> build\lib.win-amd64-3.8\pynumpress
running build_ext
building 'pynumpress.pynumpress' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pynumpress
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tppynumpress/pynumpress.cpp /Fobuild\temp.win-amd64-3.8\Release\pynumpress/pynumpress.obj /EHsc
pynumpress.cpp
pynumpress/pynumpress.cpp(30): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe' failed with exit status 2

ERROR: Failed building wheel for pynumpress
Running setup.py clean for pynumpress
Failed to build pynumpress
Installing collected packages: pynumpress
Running setup.py install for pynumpress ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\weant\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"'; file='"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\weant\AppData\Local\Temp\pip-record-tcz_kokb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\weant\AppData\Local\Programs\Python\Python38\Include\pynumpress'
cwd: C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pynumpress
copying pynumpress__init__.py -> build\lib.win-amd64-3.8\pynumpress
running build_ext
building 'pynumpress.pynumpress' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pynumpress
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tppynumpress/pynumpress.cpp /Fobuild\temp.win-amd64-3.8\Release\pynumpress/pynumpress.obj /EHsc
pynumpress.cpp
pynumpress/pynumpress.cpp(30): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\weant\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"'; file='"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\weant\AppData\Local\Temp\pip-record-tcz_kokb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\weant\AppData\Local\Programs\Python\Python38\Include\pynumpress' Check the logs for full command output.
Reply
#2
try just: pip install pynumpress without python -m

This package does not have a GitHub repository (or at least not specified in the PyPi entry), therefore it's anyone's guess as to how to install.

Personally, that would be enough for me not to attempt installation.

If suggestion at top does not work for you, I would suggest contacting the authors, who's email address can be had here: https://pypi.org/project/pynumpress/#description
Reply
#3
Look at setup.py
So need a compiler like eg MinGW and also this cl.exe file.
import os
import platform
from setuptools import setup, Extension, find_packages

import numpy as np

extra_compile_args = []
if platform.system().lower() == 'windows':
    # This may fail if compiled on Windows with a compiler
    # that doesn't provide a cl.exe compatability frontend
    # like mingw
    extra_compile_args = ['/EHsc']


try:
    from Cython.Build import cythonize
    ext_modules = [
        Extension(
            "pynumpress.pynumpress", [
                os.path.join('pynumpress/pynumpress.pyx'),
                os.path.join('pynumpress/MSNumpress.cpp'),
            ],
            language='c++',
            extra_compile_args=extra_compile_args,
            include_dirs=[np.get_include()]
        )
    ]
.......ect
So no Doc for setting this up,if really need it can install Anaconda/Miniconda be an easier choice,
as conda has this package Pynumpress :: Anaconda Cloud
Quick test:
(base) G:\Anaconda3
λ conda install -c conda-forge pynumpress
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: G:\Anaconda3

  added / updated specs:
    - pynumpress


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2020.6.20          |   py37hf50a25e_2         152 KB  conda-forge
    conda-4.9.0                |   py37hf50a25e_1         3.1 MB  conda-forge
    openssl-1.1.1h             |       he774522_0         5.8 MB  conda-forge
    pynumpress-0.0.5           |   py37h414f9d2_2          96 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         9.0 MB

The following NEW packages will be INSTALLED:

  pynumpress         conda-forge/win-64::pynumpress-0.0.5-py37h414f9d2_2

The following packages will be UPDATED:

  ca-certificates                     2019.11.28-hecc5488_0 --> 2020.6.20-hecda079_0
  certifi                         2019.11.28-py37hc8dfbb8_1 --> 2020.6.20-py37hf50a25e_2
  conda                                4.8.3-py37hc8dfbb8_1 --> 4.9.0-py37hf50a25e_1
  openssl                                 1.1.1f-hfa6e2cd_0 --> 1.1.1h-he774522_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
certifi-2020.6.20    | 152 KB    | ####################################################################################################### | 100%
conda-4.9.0          | 3.1 MB    | ####################################################################################################### | 100%
pynumpress-0.0.5     | 96 KB     | ####################################################################################################### | 100%
openssl-1.1.1h       | 5.8 MB    | ####################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
# Test
(base) G:\Anaconda3
λ python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pynumpress import pynumpress
>>>
>>> # No error
Reply
#4
(Nov-01-2020, 04:41 PM)weantony Wrote: Hi Everyone,

I am a rookie in both coding and python. I got some problem while trying to install some python repository from GitHub. I find out problem comes from installing pynumpress. Could someone help to see what the problem is please? I am sure I have already installed pynum, wheel and visual studio 2019. But it still gives 'failed building wheel for pynumpress' and 'command error out with exit status 1'. Below is the entile infomation from CMD window. Thank you very much in advance.

C:\Users\weant>python -m pip install pynumpress
Collecting pynumpress
Using cached pynumpress-0.0.5.tar.gz (110 kB)
Requirement already satisfied: numpy in c:\users\weant\appdata\roaming\python\python38\site-packages (from pynumpress) (1.19.2)
Building wheels for collected packages: pynumpress
Building wheel for pynumpress (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\weant\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"'; file='"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\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 'C:\Users\weant\AppData\Local\Temp\pip-wheel-9kizjgp0'
cwd: C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pynumpress
copying pynumpress__init__.py -> build\lib.win-amd64-3.8\pynumpress
running build_ext
building 'pynumpress.pynumpress' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pynumpress
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tppynumpress/pynumpress.cpp /Fobuild\temp.win-amd64-3.8\Release\pynumpress/pynumpress.obj /EHsc
pynumpress.cpp
pynumpress/pynumpress.cpp(30): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe' failed with exit status 2

ERROR: Failed building wheel for pynumpress
Running setup.py clean for pynumpress
Failed to build pynumpress
Installing collected packages: pynumpress
Running setup.py install for pynumpress ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\weant\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"'; file='"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\weant\AppData\Local\Temp\pip-record-tcz_kokb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\weant\AppData\Local\Programs\Python\Python38\Include\pynumpress'
cwd: C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pynumpress
copying pynumpress__init__.py -> build\lib.win-amd64-3.8\pynumpress
running build_ext
building 'pynumpress.pynumpress' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\pynumpress
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Roaming\Python\Python38\site-packages\numpy\core\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include -IC:\Users\weant\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tppynumpress/pynumpress.cpp /Fobuild\temp.win-amd64-3.8\Release\pynumpress/pynumpress.obj /EHsc
pynumpress.cpp
pynumpress/pynumpress.cpp(30): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\weant\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"'; file='"'"'C:\Users\weant\AppData\Local\Temp\pip-install-cwdaau9c\pynumpress\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\weant\AppData\Local\Temp\pip-record-tcz_kokb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\weant\AppData\Local\Programs\Python\Python38\Include\pynumpress' Check the logs for full command output.

Hi Larz 60+,

I found out the problem is actual about python. The folder named include is missing. I reinstalled python solved the problem. Thank you very much for your help.
Reply
#5
(Nov-01-2020, 06:26 PM)Larz60+ Wrote: try just: pip install pynumpress without python -m

This package does not have a GitHub repository (or at least not specified in the PyPi entry), therefore it's anyone's guess as to how to install.

Personally, that would be enough for me not to attempt installation.

If suggestion at top does not work for you, I would suggest contacting the authors, who's email address can be had here: https://pypi.org/project/pynumpress/#description

Hi Larz 60+,
I found out the problem is actual about python. The folder named include is missing. I reinstalled python solved the problem. Thank you very much for your help.
Reply
#6
(Nov-01-2020, 08:24 PM)snippsat Wrote: Look at setup.py
So need a compiler like eg MinGW and also this cl.exe file.
import os
import platform
from setuptools import setup, Extension, find_packages

import numpy as np

extra_compile_args = []
if platform.system().lower() == 'windows':
    # This may fail if compiled on Windows with a compiler
    # that doesn't provide a cl.exe compatability frontend
    # like mingw
    extra_compile_args = ['/EHsc']


try:
    from Cython.Build import cythonize
    ext_modules = [
        Extension(
            "pynumpress.pynumpress", [
                os.path.join('pynumpress/pynumpress.pyx'),
                os.path.join('pynumpress/MSNumpress.cpp'),
            ],
            language='c++',
            extra_compile_args=extra_compile_args,
            include_dirs=[np.get_include()]
        )
    ]
.......ect
So no Doc for setting this up,if really need it can install Anaconda/Miniconda be an easier choice,
as conda has this package Pynumpress :: Anaconda Cloud
Quick test:
(base) G:\Anaconda3
λ conda install -c conda-forge pynumpress
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: G:\Anaconda3

  added / updated specs:
    - pynumpress


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2020.6.20          |   py37hf50a25e_2         152 KB  conda-forge
    conda-4.9.0                |   py37hf50a25e_1         3.1 MB  conda-forge
    openssl-1.1.1h             |       he774522_0         5.8 MB  conda-forge
    pynumpress-0.0.5           |   py37h414f9d2_2          96 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         9.0 MB

The following NEW packages will be INSTALLED:

  pynumpress         conda-forge/win-64::pynumpress-0.0.5-py37h414f9d2_2

The following packages will be UPDATED:

  ca-certificates                     2019.11.28-hecc5488_0 --> 2020.6.20-hecda079_0
  certifi                         2019.11.28-py37hc8dfbb8_1 --> 2020.6.20-py37hf50a25e_2
  conda                                4.8.3-py37hc8dfbb8_1 --> 4.9.0-py37hf50a25e_1
  openssl                                 1.1.1f-hfa6e2cd_0 --> 1.1.1h-he774522_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
certifi-2020.6.20    | 152 KB    | ####################################################################################################### | 100%
conda-4.9.0          | 3.1 MB    | ####################################################################################################### | 100%
pynumpress-0.0.5     | 96 KB     | ####################################################################################################### | 100%
openssl-1.1.1h       | 5.8 MB    | ####################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
# Test
(base) G:\Anaconda3
λ python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pynumpress import pynumpress
>>>
>>> # No error

Hi snippsat,
I found out the problem is actual about python. The folder named include is missing. I reinstalled python solved the problem. Thank you very much for your help.
snippsat likes this post
Reply
#7
(Nov-03-2020, 06:07 PM)weantony Wrote: Hi snippsat,
I found out the problem is actual about python. The folder named include is missing. I reinstalled python solved the problem. Thank you very much for your help.
Thanks for info,did you mange to install without having a compiler like MinGW and cl.exe,or did do this before?
I didn't try to first do just pip install pynumpress,as i looked as setup.py first.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exception while intalling jupyter notebook bmohanraj91 3 4,540 May-28-2017, 02:02 AM
Last Post: bmohanraj91

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020