mosquito / cysystemd

systemd wrapper on Cython
Apache License 2.0
101 stars 21 forks source link

Python 3.7 #18

Closed aclowkey closed 3 years ago

aclowkey commented 5 years ago
python3.7 -m pip install systemd
Collecting systemd
  Downloading https://files.pythonhosted.org/packages/d4/c2/2195b049effd866b5d26926e672be83fc6f3263aa71ea0639e8eab44851
e/systemd-0.16.1.tar.gz (173kB)
     |████████████████████████████████| 174kB 2.8MB/s
Building wheels for collected packages: systemd
  Building wheel for systemd (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t02fpw57/sy
stemd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-t02fpw57/systemd/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 /tmp/pip-wheel-ampnr8_x --python-tag cp37
       cwd: /tmp/pip-install-t02fpw57/systemd/
  Complete output (19 lines):
  /usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'build_requires'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/systemd
  copying systemd/__init__.py -> build/lib.linux-x86_64-3.7/systemd
  copying systemd/daemon.py -> build/lib.linux-x86_64-3.7/systemd
  copying systemd/journal.py -> build/lib.linux-x86_64-3.7/systemd
  running build_ext
  building 'systemd._daemon' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/systemd
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-st
rong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTI
FY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c systemd/_daemon.c -o build/temp.linux-x86_64-3.7/systemd/_daemon.o
  systemd/_daemon.c:20:20: fatal error: Python.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for systemd
  Running setup.py clean for systemd
Failed to build systemd
Installing collected packages: syste
KoraiD commented 4 years ago
python3.7 -m pip install systemd
Collecting systemd
  Downloading https://files.pythonhosted.org/packages/d4/c2/2195b049effd866b5d26926e672be83fc6f3263aa71ea0639e8eab44851
e/systemd-0.16.1.tar.gz (173kB)
     |████████████████████████████████| 174kB 2.8MB/s
Building wheels for collected packages: systemd
  Building wheel for systemd (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t02fpw57/sy
stemd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-t02fpw57/systemd/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 /tmp/pip-wheel-ampnr8_x --python-tag cp37
       cwd: /tmp/pip-install-t02fpw57/systemd/
  Complete output (19 lines):
  /usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'build_requires'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/systemd
  copying systemd/__init__.py -> build/lib.linux-x86_64-3.7/systemd
  copying systemd/daemon.py -> build/lib.linux-x86_64-3.7/systemd
  copying systemd/journal.py -> build/lib.linux-x86_64-3.7/systemd
  running build_ext
  building 'systemd._daemon' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/systemd
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-st
rong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTI
FY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c systemd/_daemon.c -o build/temp.linux-x86_64-3.7/systemd/_daemon.o
  systemd/_daemon.c:20:20: fatal error: Python.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for systemd
  Running setup.py clean for systemd
Failed to build systemd
Installing collected packages: syste

I have the same error message with python 3.7. Are there any solutions?

mosquito commented 4 years ago

This line is an answer systemd/_daemon.c:20:20: fatal error: Python.h: No such file or directory. You haven't installed python headers.

tyler-jachetta commented 3 years ago

@mosquito can probably close this ;)

alexbprofit commented 3 years ago
  ERROR: Failed building wheel for systemd
  Running setup.py clean for systemd
Failed to build systemd
Installing collected packages: systemd
    Running setup.py install for systemd ... error
    ERROR: Command errored out with exit status 1:
     command: 'd:\cc\pypy\test\scripts\pypy3.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alex_PC\\AppData\\Local\\Temp\\pip-install-nrdbdggc\\systemd_3a9a9648dd584c87a765e9b827db3048\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alex_PC\\AppData\\Local\\Temp\\pip-install-nrdbdggc\\systemd_3a9a9648dd584c87a765e9b827db3048\\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\Alex_PC\AppData\Local\Temp\pip-record-35u426md\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\cc\pypy\test\include\site\python3.7\systemd'
         cwd: C:\Users\Alex_PC\AppData\Local\Temp\pip-install-nrdbdggc\systemd_3a9a9648dd584c87a765e9b827db3048\
    Complete output (29 lines):
    [1/3] Cythonizing systemd/_daemon.pyx
    d:\cc\pypy\test\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Alex_PC\AppData\Local\Temp\pip-install-nrdbdggc\systemd_3a9a9648dd584c87a765e9b827db3048\systemd\_daemon.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    [2/3] Cythonizing systemd/_journal.pyx
    d:\cc\pypy\test\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Alex_PC\AppData\Local\Temp\pip-install-nrdbdggc\systemd_3a9a9648dd584c87a765e9b827db3048\systemd\_journal.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    [3/3] Cythonizing systemd/reader.pyx
    d:\cc\pypy\test\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Alex_PC\AppData\Local\Temp\pip-install-nrdbdggc\systemd_3a9a9648dd584c87a765e9b827db3048\systemd\reader.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    D:\cc\pypy\lib-python\3\distutils\dist.py:274: UserWarning: Unknown distribution option: 'build_requires'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\systemd
    copying systemd\daemon.py -> build\lib.win-amd64-3.7\systemd
    copying systemd\journal.py -> build\lib.win-amd64-3.7\systemd
    copying systemd\__init__.py -> build\lib.win-amd64-3.7\systemd
    running build_ext
    building 'systemd._daemon' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\systemd
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\cc\pypy\test\include -ID:\cc\pypy\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt /Tcsystemd/_daemon.c /Fobuild\temp.win-amd64-3.7\Release\systemd/_daemon.obj
    _daemon.c
    systemd/_daemon.c(626): fatal error C1083: \u040c\u0490 г¤ \u0490вбп \xaeвЄалвм д \xa9\xab ўЄ\xabоз\u0490\xadЁ\u0490: systemd/sd-daemon.h: No such file or directory,
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\cc\pypy\test\scripts\pypy3.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alex_PC\\AppData\\Local\\Temp\\pip-install-nrdbdggc\\systemd_3a9a9648dd584c87a765e9b827db3048\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alex_PC\\AppData\\Local\\Temp\\pip-install-nrdbdggc\\systemd_3a9a9648dd584c87a765e9b827db3048\\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\Alex_PC\AppData\Local\Temp\pip-record-35u426md\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\cc\pypy\test\include\site\python3.7\systemd' Check the logs for full command output.
alexbprofit commented 3 years ago

how to get systemd library for windows???