closeio/ciso8601

Unable to install on Windows

Closed this issue · 3 comments

Hi all,

I'm trying to do a simple pip install on Windows 10, but I get the below error when trying to do so:

C:\Users\marti>pip install ciso8601
Collecting ciso8601
  Using cached ciso8601-2.1.3.tar.gz (15 kB)
Building wheels for collected packages: ciso8601
  Building wheel for ciso8601 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\marti\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marti\\AppData\\Local\\Temp\\pip-install-uret8oh9\\ciso8601\\setup.py'"'"'; __file__='"'"'C:\\Users\\marti\\AppData\\Local\\Temp\\pip-install-uret8oh9\\ciso8601\\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\marti\AppData\Local\Temp\pip-wheel-rd64cadi'
       cwd: C:\Users\marti\AppData\Local\Temp\pip-install-uret8oh9\ciso8601\
  Complete output (17 lines):
  running bdist_wheel
  running build
  running build_py
  package init file 'ciso8601\__init__.py' not found (or not a regular file)
  creating build
  creating build\lib.win-amd64-3.7
  creating build\lib.win-amd64-3.7\ciso8601
  copying ciso8601\__init__.pyi -> build\lib.win-amd64-3.7\ciso8601
  copying ciso8601\py.typed -> build\lib.win-amd64-3.7\ciso8601
  running build_ext
  building 'ciso8601' extension
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCISO8601_VERSION=2.1.3 -Ic:\users\marti\appdata\local\programs\python\python37\include -Ic:\users\marti\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcmodule.c /Fobuild\temp.win-amd64-3.7\Release\module.obj
  module.c
  c:\users\marti\appdata\local\programs\python\python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for ciso8601
  Running setup.py clean for ciso8601
Failed to build ciso8601
Installing collected packages: ciso8601
    Running setup.py install for ciso8601 ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\marti\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marti\\AppData\\Local\\Temp\\pip-install-uret8oh9\\ciso8601\\setup.py'"'"'; __file__='"'"'C:\\Users\\marti\\AppData\\Local\\Temp\\pip-install-uret8oh9\\ciso8601\\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\marti\AppData\Local\Temp\pip-record-5qx55zzz\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\marti\appdata\local\programs\python\python37\Include\ciso8601'
         cwd: C:\Users\marti\AppData\Local\Temp\pip-install-uret8oh9\ciso8601\
    Complete output (17 lines):
    running install
    running build
    running build_py
    package init file 'ciso8601\__init__.py' not found (or not a regular file)
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\ciso8601
    copying ciso8601\__init__.pyi -> build\lib.win-amd64-3.7\ciso8601
    copying ciso8601\py.typed -> build\lib.win-amd64-3.7\ciso8601
    running build_ext
    building 'ciso8601' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCISO8601_VERSION=2.1.3 -Ic:\users\marti\appdata\local\programs\python\python37\include -Ic:\users\marti\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcmodule.c /Fobuild\temp.win-amd64-3.7\Release\module.obj
    module.c
    c:\users\marti\appdata\local\programs\python\python37\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\marti\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marti\\AppData\\Local\\Temp\\pip-install-uret8oh9\\ciso8601\\setup.py'"'"'; __file__='"'"'C:\\Users\\marti\\AppData\\Local\\Temp\\pip-install-uret8oh9\\ciso8601\\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\marti\AppData\Local\Temp\pip-record-5qx55zzz\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\marti\appdata\local\programs\python\python37\Include\ciso8601' Check the logs for full command output.

I am also unable to install on Windows 10, Python 3.8.5.

Neither with plain pip:

! pip install ciso8601

Collecting ciso8601
  Downloading ciso8601-2.1.3.tar.gz (15 kB)
Building wheels for collected packages: ciso8601
  Building wheel for ciso8601 (setup.py): started
  Building wheel for ciso8601 (setup.py): finished with status error
  Running setup.py clean for ciso8601
Failed to build ciso8601
Installing collected packages: ciso8601
    Running setup.py install for ciso8601: started
    Running setup.py install for ciso8601: finished with status error

  ERROR: Command errored out with exit status 1:
   command: C:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\Scripts\python.exe -u -c import sys, setuptools, tokenize; sys.argv[0] = ""C:\\Users\\GM\\AppData\\Local\\Temp\\pip-install-j5aexyie\\ciso8601\\setup.py''"; __file__=""C:\\Users\\GM\\AppData\\Local\\Temp\\pip-install-j5aexyie\\ciso8601\\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\GM\AppData\Local\Temp\pip-wheel-2sa5hgzu
       cwd: C:\Users\GM\AppData\Local\Temp\pip-install-j5aexyie\ciso8601\
  Complete output (19 lines):
  running bdist_wheel
  running build
  running build_py
  package init file ciso8601\__init__.py not found (or not a regular file)
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\ciso8601
  copying ciso8601\__init__.pyi -> build\lib.win-amd64-3.8\ciso8601
  copying ciso8601\py.typed -> build\lib.win-amd64-3.8\ciso8601
  warning: build_py: byte-compiling is disabled, skipping.
  
  running build_ext
  building ciso8601 extension
  creating build\temp.win-amd64-3.8
  creating build\temp.win-amd64-3.8\Release
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCISO8601_VERSION=2.1.3 -IC:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\include -Ic:\users\gm\.pyenv\pyenv-win\versions\3.8.5\include -Ic:\users\gm\.pyenv\pyenv-win\versions\3.8.5\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" /Tcmodule.c /Fobuild\temp.win-amd64-3.8\Release\module.obj
  module.c
  c:\users\gm\.pyenv\pyenv-win\versions\3.8.5\include\pyconfig.h(59): fatal error C1083: Cannot open include file: io.h: No such file or directory
  error: command C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for ciso8601
DEPRECATION: Could not build wheels for ciso8601 which do not use PEP 517. pip will fall back to legacy setup.py install for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GM\\AppData\\Local\\Temp\\pip-install-j5aexyie\\ciso8601\\setup.py'"'"'; __file__='"'"'C:\\Users\\GM\\AppData\\Local\\Temp\\pip-install-j5aexyie\\ciso8601\\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\GM\AppData\Local\Temp\pip-record-v8rtvi7o\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\include\site\python3.8\ciso8601'
         cwd: C:\Users\GM\AppData\Local\Temp\pip-install-j5aexyie\ciso8601\
    Complete output (19 lines):
    running install
    running build
    running build_py
    package init file ciso8601\__init__.py not found (or not a regular file)
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\ciso8601
    copying ciso8601\__init__.pyi -> build\lib.win-amd64-3.8\ciso8601
    copying ciso8601\py.typed -> build\lib.win-amd64-3.8\ciso8601
    warning: build_py: byte-compiling is disabled, skipping.
    
    running build_ext
    building ciso8601 extension
    creating build\temp.win-amd64-3.8
    creating build\temp.win-amd64-3.8\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCISO8601_VERSION=2.1.3 -IC:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\include -Ic:\users\gm\.pyenv\pyenv-win\versions\3.8.5\include -Ic:\users\gm\.pyenv\pyenv-win\versions\3.8.5\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" /Tcmodule.c /Fobuild\temp.win-amd64-3.8\Release\module.obj
    module.c
    c:\users\gm\.pyenv\pyenv-win\versions\3.8.5\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GM\\AppData\\Local\\Temp\\pip-install-j5aexyie\\ciso8601\\setup.py'"'"'; __file__='"'"'C:\\Users\\GM\\AppData\\Local\\Temp\\pip-install-j5aexyie\\ciso8601\\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\GM\AppData\Local\Temp\pip-record-v8rtvi7o\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\GM\.virtualenvs\Currency_warning-2uanqsqR\include\site\python3.8\ciso8601' Check the logs for full command output.

...nor with pipenv:

! pipenv install ciso8601

Installing ciso8601…
Installing #--skip-lock…

Adding ciso8601 to Pipfile's [packages]…
�Installation Succeeded 

[    ] Installing...
WARNING: not enough values to unpack (expected 1, got 0)
�Installation Failed 

IDK if the following information may help:
At some point I had cPython in the lock file of pipenv (even though it is shipped within Python 3.8.5). Then pipenv at least said there were some incompatible dependencies of sico8601 and cPython.

Try installing the windows 10 SDK here, it worked for me.

+1; Windows 10; Python 3.8.5

I found success following [this] SO post.