numpy error while installing ninja using pip - python

I am trying to install scipy but run into an error when installing ninja. I have no idea what it means.
pip install ninja
Output:
error: subprocess-exited-with-error
× Building wheel for ninja (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [56 lines of output]
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-uqf_okg8/ninja_2e64af0719684abb933d58ab1744c650/_cmake_test_compile/build
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/raspiparenting/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/raspiparenting/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/raspiparenting/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 412, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 32, in <module>
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 637, in setup
env = cmkr.configure(
File "/tmp/pip-build-env-fr91240v/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 295, in configure
cmd.append(prefix + "_NumPy_INCLUDE_DIRS:PATH=" + np.get_include())
AttributeError: module 'numpy' has no attribute 'get_include'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ninja ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
Things I tried:
update pip (pip install --upgrade pip, Can't install Scipy through pip)
reinstall numpy

You can try to pip specific version of ninja(That was work for
me.), if you didn't.
Downgrade your pip version pip install pip==21.3.1.You can see here all PIP versions are listed out there any try one by one If You don’t want to use 21.3.1. and by downgrading pip your error will be fixed.
You should update the pyproject.toml and try
again, it should work fine.

Related

why I could not install dlib

I was trying to install dlib but I couldn't install this.
Please help. I am getting error while installing dlib.
I am not able to install this, Please help me out to install this.
I did research on it but I couldn't get it. can anyone help me to solve this...
Error:
Collecting dlib
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
WARNING: Ignoring invalid distribution -pencv-python (c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages)
Installing collected packages: dlib
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [122 lines of output]
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=c:\users\manoj\appdata\local\programs\python\python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\build\lib.win-amd64-3.9 -A x64'
-- Building for: Visual Studio 10 2010
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Detecting C compiler ABI info
CMake Warning in C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/CMakeLists.txt:
The binary and/or source directory paths may be too long to generate Visual
Studio 10 files for this project. Consider choosing shorter directory
names to build this project with Visual Studio 10. A more detailed
explanation follows.
There is a bug in the VS 10 IDE that renders property dialog fields blank
for files referenced by full path in the project file. However, CMake must
reference at least one file by full path:
C:/Users/Manoj/AppData/Local/Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCCompilerABI.c
This is because some Visual Studio tools would append the relative path to
the end of the referencing directory path, as in:
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/../../../../../../../../Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCCompilerABI.c
and then incorrectly complain that the file does not exist because the path
length is too long for some internal buffer or API. To avoid this problem
CMake must use a full path for this file which then triggers the VS 10
property dialog bug.
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
CMake Warning in C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/CMakeLists.txt:
The binary and/or source directory paths may be too long to generate Visual
Studio 10 files for this project. Consider choosing shorter directory
names to build this project with Visual Studio 10. A more detailed
explanation follows.
There is a bug in the VS 10 IDE that renders property dialog fields blank
for files referenced by full path in the project file. However, CMake must
reference at least one file by full path:
C:/Users/Manoj/AppData/Local/Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp
This is because some Visual Studio tools would append the relative path to
the end of the referencing directory path, as in:
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeTmp/../../../../../../../../Programs/Python/Python39/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp
and then incorrectly complain that the file does not exist because the path
length is too long for some internal buffer or API. To avoid this problem
CMake must use a full path for this file which then triggers the VS 10
property dialog bug.
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users/Manoj/AppData/Local/Programs/Python/Python39/python.exe (found version "3.9.5")
-- Found PythonLibs: C:/Users/Manoj/AppData/Local/Programs/Python/Python39/libs/Python39.lib
-- pybind11 v2.2.4
-- Using CMake version: 3.22.4
-- Compiling dlib version: 19.24.0
CMake Error at C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/set_compiler_specific_options.cmake:31 (message):
C++11 is required to use dlib, but the version of Visual Studio you are
using is too old and doesn't support C++11. You need Visual Studio 2015 or
newer.
Call Stack (most recent call first):
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/test_for_sse4/CMakeLists.txt:8 (include)
CMake Error at C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/check_if_sse4_instructions_executable_on_host.cmake:13 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/cmake_utils/set_compiler_specific_options.cmake:13 (include)
C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/dlib/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Manoj/AppData/Local/Temp/pip-install-azri193f/dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\setup.py", line 222, in <module>
setup(
File "c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\Manoj\AppData\Local\Temp\pip-install-azri193f\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\manoj\appdata\local\programs\python\python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Manoj\\AppData\\Local\\Temp\\pip-install-azri193f\\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Manoj\\AppData\\Local\\Temp\\pip-install-azri193f\\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=c:\\users\\manoj\\appdata\\local\\programs\\python\\python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Manoj\\AppData\\Local\\Temp\\pip-install-azri193f\\dlib_4d5ab15ff10d4c9cb3ee98bad5a48c2d\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -pencv-python (c:\users\manoj\appdata\local\programs\python\python39\lib\site-packages)
WARNING: You are using pip version 22.0.2; however, version 22.1.1 is available.
You should consider upgrading via the 'c:\users\manoj\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
Please help. I am getting error while installing dlib.
I am not able to install this, Please help me out to install this.
I did research on it but I couldn't get it. can anyone help me to solve this...

llvmlite failed to install. Error building llvmlite

I have a problem with installing llvmlite, which is need for installing Numba.
I searched for answers to my problem, but nothing is working.
The command I used to install numba and llvmlite:
pip install numba
pip install llvmlite
enter code here
Error code:
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
Running setup.py install for llvmlite ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\owner\\AppData\\Local\\Temp\\pip-install-hif24z13\
\llvmlite_0e0be86c2ed14239b3eec11a3bd23922\\setup.py'"'"'; __file__='"'"'C:\\Use
rs\\owner\\AppData\\Local\\Temp\\pip-install-hif24z13\\llvmlite_0e0be86c2ed14239
b3eec11a3bd23922\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file
__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(c
ode, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\owner\AppData\Local\
Temp\pip-record-sipsgexo\install-record.txt' --single-version-externally-managed
--compile --install-headers 'c:\python39\Include\llvmlite'
cwd: C:\Users\owner\AppData\Local\Temp\pip-install-hif24z13\llvmlite_0e
0be86c2ed14239b3eec11a3bd23922\
Complete output (59 lines):
running install
running build
got version from file C:\Users\owner\AppData\Local\Temp\pip-install-hif24z13
\llvmlite_0e0be86c2ed14239b3eec11a3bd23922\llvmlite/_version.py {'version': '0.3
5.0', 'full': 'ea23b026930cc00824c907172383f54c9d438e6b'}
running build_ext
c:\python39\python.exe C:\Users\owner\AppData\Local\Temp\pip-install-hif24z1
3\llvmlite_0e0be86c2ed14239b3eec11a3bd23922\ffi\build.py
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 6.3.9600.
-- The C compiler identification is MSVC 19.16.27043.0
-- The CXX compiler identification is MSVC 19.16.27043.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu
dio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S
tudio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/owner/AppData/Local/Temp/tmp1e
4ama0u
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 6.3.9600.
CMake Error at CMakeLists.txt:9 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "C:/Users/owner/AppData/Local/Temp/pip-install-hif24z13/llvmlite_0e
0be86c2ed14239b3eec11a3bd23922/ffi/build/CMakeFiles/CMakeOutput.log".
Trying generator 'Visual Studio 15 2017 Win64'
Traceback (most recent call last):
File "C:\Users\owner\AppData\Local\Temp\pip-install-hif24z13\llvmlite_0e0b
e86c2ed14239b3eec11a3bd23922\ffi\build.py", line 191, in <module>
main()
File "C:\Users\owner\AppData\Local\Temp\pip-install-hif24z13\llvmlite_0e0b
e86c2ed14239b3eec11a3bd23922\ffi\build.py", line 179, in main
main_win32()
File "C:\Users\owner\AppData\Local\Temp\pip-install-hif24z13\llvmlite_0e0b
e86c2ed14239b3eec11a3bd23922\ffi\build.py", line 93, in main_win32
try_cmake(here_dir, build_dir, generator)
File "C:\Users\owner\AppData\Local\Temp\pip-install-hif24z13\llvmlite_0e0b
e86c2ed14239b3eec11a3bd23922\ffi\build.py", line 28, in try_cmake
subprocess.check_call(['cmake', '-G', generator, cmake_dir])
File "c:\python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-G', 'Visual Studio 15 20
17 Win64', 'C:\\Users\\owner\\AppData\\Local\\Temp\\pip-install-hif24z13\\llvmli
te_0e0be86c2ed14239b3eec11a3bd23922\\ffi']' returned non-zero exit status 1.
error: command 'c:\\python39\\python.exe' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'i
mport sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\owner\\AppData\\L
ocal\\Temp\\pip-install-hif24z13\\llvmlite_0e0be86c2ed14239b3eec11a3bd23922\\set
up.py'"'"'; __file__='"'"'C:\\Users\\owner\\AppData\\Local\\Temp\\pip-install-hi
f24z13\\llvmlite_0e0be86c2ed14239b3eec11a3bd23922\\setup.py'"'"';f=getattr(token
ize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'
\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --reco
rd 'C:\Users\owner\AppData\Local\Temp\pip-record-sipsgexo\install-record.txt' --
single-version-externally-managed --compile --install-headers 'c:\python39\Inclu
de\llvmlite' Check the logs for full command output.
Please help me, I have been looking for a way to solve this problem for 2 days, but without success, I am desperate
Go to here and download llvmlite package for your python version, e.g. llvmlite‑0.35.0‑cp39‑cp39‑win_amd64.whl for Python 3.9.
Then install pip install llvmlite‑0.35.0‑cp39‑cp39‑win_amd64.whl.
Probably llvmlite is not yet officially supported on Python 3.9. That's why there are only unofficial builds like on this site.
Also if you need numba then go to here and download/install numba‑0.51.2‑cp39‑cp39‑win_amd64.whl. Latest numba 0.52.0 is not yet compiled by this site owner for Python 3.9, only version 0.51.2.
Also when installing numba you may need to pass key --no-deps to pip to ignore installing dependencies, like pip install --no-deps numba‑0.51.2‑cp39‑cp39‑win_amd64.whl because numba 0.51.2 wants a bit older version of llvmlite by default. Also few small extra dependencies are needed to be installed manually. So all steps for installing on Win Python 3.9 64-bit are:
pip install llvmlite‑0.35.0‑cp39‑cp39‑win_amd64.whl (.whl file from here).
pip install --no-deps numba‑0.51.2‑cp39‑cp39‑win_amd64.whl (.whl file from here).
pip install numpy importlib-metadata (small few extra dependencies via regular pip install without downloading).
PS. Site by link mentioned above has only Windows packages. Also this site has many other popular wheels packages for Python, most of them are placed on this site because they are not currently available inside official PIP repository..
Install llvm {version} greater than 7 using command
suda apt install llvm-{version}
Than to install numba or llvmlite {package} use command
LLVM_CONFIG={path to llvm-config file} pip install {package}
For example (For llvm version=8)
LLVM_CONFIG=/usr/bin/llvm-config-8 pip install numba==0.48
llvmlite does not have support for python 3.9 yet. Uninstall python 3.9 and download python 3.8.7 and try again. This solved for the problem for me.
Another approach is to install llvmlite version which is directly compatible with Python 3.9.
today I successfully did that with pip install llvmlite==0.36.0rc1; you may want to use some other latest version.

Trouble with control module .statespace .pzmap

I calculate the zeros and poles of a system with control.StateSpace. In the following I want to use control.pzmap to display the result but the last doesn´t work. I can print sys and it seems okay but not as parameter of control.pzmap.
Can someone pls help me?
import numpy as np
import control
from OMPython import ModelicaSystem
import matplotlib.pyplot as plt
from help_fkt import delete_OM_files
#from numpy import pi as pi
L=0.1
R=80
C=3.3e-6
A= [[0,1/C],
[-1/L, -R/L]]
B=[[0],[1/L]]
C=[[1,0],[0,1],[-1,0]]
D= [[0],[0],[1]]
print(A)
print(B)
print(C)
print(D)
fig=plt.figure(1, figsize=(10,6)); fig.clf()
plt.show()
sys=control.StateSpace(A,B,C,D) #calculation of poles and zeros of the given system
print(sys)
a=sys.pole()
print(a)
control.pzmap(sys) #should make a diagram of poles and zeros, but doesn't work
plt.grid()
This is the error:
File "C:\anaconda3\envs\modsim\lib\site-packages\control\statesp.py",
line 575, in zero
from slycot import ab08nd
ModuleNotFoundError: No module named 'slycot'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\johan\OneDrive\Desktop\Studium\SimulationundModellbildung\Lösungen\LSG_Carlos\A7.py",
line 44, in
control.pzmap(sys)
File "C:\anaconda3\envs\modsim\lib\site-packages\control\pzmap.py",
line 91, in pzmap
zeros = sys.zero()
File
"C:\anaconda3\envs\modsim\lib\site-packages\control\statesp.py", line
587, in zero
raise NotImplementedError("StateSpace.zero only supports "
NotImplementedError: StateSpace.zero only supports systems with the same number of inputs as outputs.
Error when I try to install slycot:
(base) C:\Users\johan>pip install slycot Collecting slycot Using cached slycot-0.4.0.0.tar.gz (1.5 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Requirement already satisfied: numpy in c:\anaconda3\lib\site-packages (from slycot) (1.18.1) Building wheels for collected packages: slycot Building wheel for slycot (PEP 517) ... error ERROR: Command errored out with exit status 1: command: 'c:\anaconda3\python.exe' 'c:\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' build_wheel 'C:\Users\johan\AppData\Local\Temp\tmpsxxs_crf' cwd: C:\Users\johan\AppData\Local\Temp\pip-install-r2r2i4rs\slycot Complete output (56 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): 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/johan/AppData/Local/Temp/pip-install-r2r2i4rs/slycot/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/johan/AppData/Local/Temp/pip-install-r2r2i4rs/slycot/_cmake_test_compile/build/CMakeFiles/CMakeError.log". FC ('-DCMAKE_Fortran_COMPILER=', 'c:/anaconda3/Library/bin/flang.exe') F2PY ('-DF2PY_EXECUTABLE=', 'c:/anaconda3/Scripts/f2py.exe') NUMPY_INCLUDE ('-DNumPy_INCLUDE_DIR=', 'c:/anaconda3/Include') ['-DSLYCOT_VERSION:STRING=0.4.0', '-DGIT_REVISION:STRING=ac0944b363a6cfcc0c3d5128cdd484d74173aa3b', '-DISRELEASE:STRING=True', '-DFULL_VERSION=0.4.0.gitac0944b', '-GNMake Makefiles', '-DCMAKE_Fortran_COMPILER=c:/anaconda3/Library/bin/flang.exe', '-DF2PY_EXECUTABLE=c:/anaconda3/Scripts/f2py.exe', '-DNumPy_INCLUDE_DIR=c:/anaconda3/Include', '-DCMAKE_Fortran_SIMULATE_VERSION=5.0.0', '-DCMAKE_Fortran_COMPILER_ID=Flang', '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON'] -------------------------------------------------------------------------------- -- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- -- ------- ------------ ----------------- ---------------------- --------------------------- -------------------------------- -- Trying "NMake Makefiles (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 slycot Failed to build slycot ERROR: Could not build wheels for slycot which use PEP 517 and cannot be installed directly WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available. You should consider upgrading via the 'c:\anaconda3\python.exe -m pip install --upgrade pip' command.
Ok, I've installed anaconda environment (just for you ;) ) to pinpoint the problem. It seems thats not just your machine and using the package that you use is a little difficult then trivial.
It seems that you have two problems.
First problem is, one of the packages you use depends on slycot. But slycot requires some compiling work on the background in order to install itself. Compiling the files on your pc requires having a compiler installed on your computer. Preferred compiler for this package is Visual Studio 2017. If you check the error message carefully, it is asking you to download and install it from this page.
Second problem is something I am not familiar with. It is complaining that the input space has to be the same size with the output space.
NotImplementedError: StateSpace.zero only supports systems with the same number of inputs as outputs.
But then again, this might be caused by the first problem.
So, let's install the VS 2017 first and see if that resolves it. If not, we'll see if anything has changed and proceed from there.

Getting dependencies error while installing ViZDoom

I am trying to install ViZDoom on Ubuntu system. I am following the steps given the following link https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md.
However, I am getting the following error:
Collecting vizdoom
Using cached https://files.pythonhosted.org/packages/2d/6c/23565c09387173423883e7881fce53541ff89b5209ca0904c67e577dd6ac/vizdoom-1.1.7.tar.gz
Collecting numpy (from vizdoom)
Using cached https://files.pythonhosted.org/packages/3d/fc/4763e5f17ac6e7e7d55f377cde859ca1c5d5ac624441ab45315bc578aa9e/numpy-1.18.3-cp36-cp36m-manylinux1_x86_64.whl
Building wheels for collected packages: vizdoom
Running setup.py bdist_wheel for vizdoom ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-n60bvxmm/vizdoom/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/tmpynt30bvbpip-wheel- --python-tag cp36:
running bdist_wheel
running build
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/include (found version "1.67.0") found components: filesystem thread system date_time chrono regex iostreams atomic
CMake Deprecation Warning at cmake_modules/CreateLaunchers.cmake:48 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/vizdoom/CMakeLists.txt:13 (include)
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80")
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Could NOT find GME (missing: GME_LIBRARIES GME_INCLUDE_DIR)
-- Using system zlib
-- Using system jpeg library
-- Using internal bzip2 library
-- Using internal gme library
-- Performing Test HAVE_NO_ARRAY_BOUNDS
-- Performing Test HAVE_NO_ARRAY_BOUNDS - Success
-- Performing Test __LIBGME_TEST_VISIBILITY
-- Performing Test __LIBGME_TEST_VISIBILITY - Success
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- /usr/include
-- /tmp/pip-build-n60bvxmm/vizdoom/src/vizdoom/bzip2
-- /tmp/pip-build-n60bvxmm/vizdoom/src/vizdoom/lzma/C
-- Looking for itoa
-- Looking for itoa - not found
-- Performing Test DUMB_CAN_USE_SSE
-- Performing Test DUMB_CAN_USE_SSE - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gtk+-2.0'
-- No package 'gtk+-2.0' found
CMake Error at /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake_modules/FindSDL2.cmake:179 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/vizdoom/src/CMakeLists.txt:206 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-build-n60bvxmm/vizdoom/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-build-n60bvxmm/vizdoom/CMakeFiles/CMakeError.log".
Installation failed, you may be missing some dependencies.
Please check https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md for details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-n60bvxmm/vizdoom/setup.py", line 119, in <module>
keywords=['vizdoom', 'doom', 'ai', 'deep learning', 'reinforcement learning', 'research']
File "/home/rishabh29/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/rishabh29/.local/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-n60bvxmm/vizdoom/setup.py", line 81, in run
subprocess.check_call(['cmake'] + cmake_arg_list)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DPYTHON_EXECUTABLE=/usr/bin/python3.6', '-DBUILD_PYTHON3=ON']' returned non-zero exit status 1.
When I try to install the ZDoom dependencies, I get the following error:
E: Unable to locate package libsdl2-dev
E: Unable to locate package nasm
E: Unable to locate package libbz2-dev
E: Package 'libgtk2.0-dev' has no installation candidate
E: Package 'cmake' has no installation candidate
E: Unable to locate package libfluidsynth-dev
E: Unable to locate package libgme-dev
E: Unable to locate package libopenal-dev
E: Unable to locate package timidity
E: Unable to locate package libwildmidi-dev
I think that there is CMake error or some version mismatch error but being new to it, I am unable to resolve it. Any help is appreciated.
Thanks!

Does Poetry install --no-dev need Rust to be installed?

I'm installing Poetry in a container in my Raspberry pi 3b+ (Lite buster February 2020). I use the image arm32v7/python:3.7-slim-buster.
Here is the Dockerfile:
FROM arm32v7/python:3.7-slim-buster
RUN apt-get update
RUN apt-get install libssl-dev -y
RUN apt-get install libffi-dev
RUN apt-get install build-essential -y
RUN pip install poetry
RUN pip install --upgrade pip
COPY ./pyproject.toml /app/
WORKDIR /app/
RUN poetry install --no-dev
COPY ./rpiserver /app/rpiserver
RUN poetry install --no-dev
ENTRYPOINT poetry
When docker runs the step with poetry install --no-dev it installs many packages including orjson (2.6.3) which requires "Rust nightly toolchain". So it fails!
Here is the error message:
Writing lock file
Package operations: 33 installs, 0 updates, 0 removals
- Installing six (1.14.0)
- Installing promise (2.3)
- Installing rx (1.6.1)
- Installing graphql-core (2.3.1)
- Installing aniso8601 (7.0.0)
- Installing certifi (2019.11.28)
- Installing chardet (3.0.4)
- Installing click (7.1.1)
- Installing dnspython (1.16.0)
- Installing graphql-relay (2.0.1)
- Installing h11 (0.9.0)
- Installing httptools (0.1.1)
- Installing idna (2.9)
- Installing markupsafe (1.1.1)
- Installing urllib3 (1.25.8)
- Installing uvloop (0.14.0)
- Installing websockets (8.1)
- Installing aiofiles (0.4.0)
- Installing async-exit-stack (1.0.1)
- Installing async-generator (1.10)
- Installing email-validator (1.0.5)
- Installing graphene (2.1.8)
- Installing itsdangerous (1.1.0)
- Installing jinja2 (2.11.1)
- Installing orjson (2.6.3)
[EnvCommandError]
Command ['/root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/bin/pip', 'install', '--no-deps', 'orjson==2.6.3'] errored with the following return code 1, and output:
Collecting orjson==2.6.3
Downloading https://files.pythonhosted.org/packages/8e/7c/e9a6f52e344c480be42fddeb1a0593283ecc1c06293ef210af4521a5b6f5/orjson-2.6.3.tar.gz (526kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/bin/python /root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wsqo2pr0/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'maturin>=0.7.9,<0.8'
cwd: None
Complete output (60 lines):
Collecting maturin<0.8,>=0.7.9
Downloading https://files.pythonhosted.org/packages/a1/ab/531984f5c304e56b47da35df5ea3ed8d862d114551720a434ebb34ce44db/maturin-0.7.9.tar.gz (80kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting toml~=0.10.0 (from maturin<0.8,>=0.7.9)
Downloading https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl
Building wheels for collected packages: maturin
Building wheel for maturin (PEP 517): started
Building wheel for maturin (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/bin/python /root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp2f8vk9ny
cwd: /tmp/pip-install-aos7ep0k/maturin
Complete output (36 lines):
running bdist_wheel
running build
installing to build/bdist.linux-armv7l/wheel
running install
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 141, in build_wheel
metadata_directory)
File "/tmp/pip-build-env-txy57zgb/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 209, in build_wheel
wheel_directory, config_settings)
File "/tmp/pip-build-env-txy57zgb/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 194, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-txy57zgb/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 97, in <module>
zip_safe=False,
File "/tmp/pip-build-env-txy57zgb/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-txy57zgb/overlay/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 228, in run
self.run_command('install')
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 54, in run
"cargo not found in PATH. Please install rust "
RuntimeError: cargo not found in PATH. Please install rust (https://www.rust-lang.org/tools/install) and try again
----------------------------------------
ERROR: Failed building wheel for maturin
Running setup.py clean for maturin
Failed to build maturin
ERROR: Could not build wheels for maturin which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: /root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/bin/python /root/.cache/pypoetry/virtualenvs/rpiserver-9TtSrW0h-py3.7/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wsqo2pr0/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'maturin>=0.7.9,<0.8' Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Service 'server' failed to build: The command '/bin/sh -c poetry install --no-dev' returned a non-zero code: 1
I didn't find any Poetry documentation that was saying to install Rust (because orjson needs maturin, which needs cargo, which needs Rust? Right?).
In order to solve this issue, I decided to install cargo and maturin in my image by editing the Dockerfile.
However I got a new issue.
Here is my Dockerfile:
FROM arm32v7/python:3.7-slim-buster
RUN apt-get update
RUN apt-get install libssl-dev -y
RUN apt-get install libffi-dev
RUN apt-get install build-essential -y
RUN pip install poetry
RUN pip install --upgrade pip
COPY ./pyproject.toml /app/
WORKDIR /app/
RUN apt-get install cargo -y
RUN pip install maturin
RUN poetry install --no-dev
COPY ./rpiserver /app/rpiserver
RUN poetry install --no-dev
ENTRYPOINT poetry
Here is the error message:
Building wheels for collected packages: maturin
Building wheel for maturin (PEP 517): started
Building wheel for maturin (PEP 517): still running...
Building wheel for maturin (PEP 517): still running...
Building wheel for maturin (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp6vyv1zmu
cwd: /tmp/pip-install-cqvpc5wg/maturin
Complete output (369 lines):
running bdist_wheel
running build
installing to build/bdist.linux-armv7l/wheel
running install
Updating crates.io index
Downloading crates ...
Downloaded serde_json v1.0.50
Downloaded sha2 v0.8.1
Downloaded shlex v0.1.1
Downloaded failure v0.1.7
Downloaded walkdir v2.3.1
Downloaded tempfile v3.1.0
Downloaded cargo_metadata v0.9.1
Downloaded bytesize v1.0.0
Downloaded digest v0.8.1
Downloaded toml v0.5.6
Downloaded zip v0.5.5
Downloaded structopt v0.3.12
Downloaded serde v1.0.105
Downloaded flate2 v1.0.14
Downloaded base64 v0.12.0
Downloaded regex v1.3.6
Downloaded reqwest v0.10.4
Downloaded tar v0.4.26
Downloaded rpassword v4.0.5
Downloaded cbindgen v0.13.2
Downloaded platform-info v0.0.1
Downloaded platforms v0.2.1
Downloaded goblin v0.2.1
Downloaded pretty_env_logger v0.4.0
Downloaded serde_derive v1.0.105
Downloaded crc32fast v1.2.0
Downloaded ryu v1.0.3
Downloaded bytes v0.5.4
Downloaded proc-macro2 v1.0.10
Downloaded cfg-if v0.1.10
Downloaded generic-array v0.12.3
Downloaded rand v0.7.3
Downloaded time v0.1.42
Downloaded futures-util v0.3.4
Downloaded pin-project-lite v0.1.4
Downloaded mime v0.3.16
Downloaded url v2.1.1
Downloaded serde_urlencoded v0.6.1
Downloaded lazy_static v1.4.0
Downloaded mime_guess v2.0.3
Downloaded http-body v0.3.1
Downloaded failure_derive v0.1.7
Downloaded same-file v1.0.6
Downloaded thread_local v1.0.1
Downloaded opaque-debug v0.2.3
Downloaded block-buffer v0.7.3
Downloaded percent-encoding v2.1.0
Downloaded semver v0.9.0
Downloaded remove_dir_all v0.5.2
Downloaded futures-core v0.3.4
Downloaded bzip2 v0.3.3
Downloaded base64 v0.11.0
Downloaded structopt-derive v0.4.5
Downloaded xattr v0.2.2
Downloaded filetime v0.2.9
Downloaded miniz_oxide v0.3.6
Downloaded log v0.4.8
Downloaded quote v1.0.3
Downloaded itoa v0.4.5
Downloaded podio v0.1.6
Downloaded memchr v2.3.3
Downloaded aho-corasick v0.7.10
Downloaded clap v2.33.0
Downloaded fake-simd v0.1.2
Downloaded tokio-rustls v0.13.0
Downloaded hyper-rustls v0.20.0
Downloaded http v0.2.1
Downloaded backtrace v0.3.46
Downloaded tokio v0.2.15
Downloaded hyper v0.13.4
Downloaded webpki-roots v0.18.0
Downloaded syn v1.0.17
Downloaded regex-syntax v0.6.17
Downloaded rustls v0.17.0
Downloaded libc v0.2.68
Downloaded env_logger v0.7.1
Downloaded adler32 v1.0.4
Downloaded getrandom v0.1.14
Downloaded rand_core v0.5.1
Downloaded fnv v1.0.6
Downloaded rand_chacha v0.2.2
Downloaded typenum v1.11.2
Downloaded slab v0.4.2
Downloaded webpki v0.21.2
Downloaded iovec v0.1.4
Downloaded want v0.3.0
Downloaded proc-macro-nested v0.1.4
Downloaded ct-logs v0.6.0
Downloaded futures-channel v0.3.4
Downloaded httparse v1.3.4
Downloaded textwrap v0.11.0
Downloaded bitflags v1.2.1
Downloaded rustc-demangle v0.1.16
Downloaded unicode-width v0.1.7
Downloaded ansi_term v0.11.0
Downloaded net2 v0.2.33
Downloaded pin-project v0.4.8
Downloaded dtoa v0.4.5
Downloaded atty v0.2.14
Downloaded vec_map v0.8.1
Downloaded pin-utils v0.1.0-alpha.4
Downloaded strsim v0.8.0
Downloaded futures-macro v0.3.4
Downloaded proc-macro-hack v0.5.15
Downloaded futures-io v0.3.4
Downloaded unicase v2.6.0
Downloaded tower-service v0.3.0
Downloaded num_cpus v1.12.0
Downloaded scroll v0.10.1
Downloaded semver-parser v0.7.0
Downloaded byteorder v1.3.4
Downloaded synstructure v0.12.3
Downloaded proc-macro-error v0.4.12
Downloaded futures-task v0.3.4
Downloaded unicode-xid v0.2.0
Downloaded byte-tools v0.3.1
Downloaded matches v0.1.8
Downloaded mio v0.6.21
Downloaded heck v0.3.1
Downloaded block-padding v0.1.5
Downloaded plain v0.2.3
Downloaded rustls-native-certs v0.3.0
Downloaded h2 v0.2.4
Downloaded idna v0.2.0
Downloaded bzip2-sys v0.1.8+1.0.8
Downloaded encoding_rs v0.8.22
Downloaded termcolor v1.1.0
Downloaded humantime v1.3.0
Downloaded sct v0.6.0
Downloaded openssl-probe v0.1.2
Downloaded tokio-util v0.3.1
Downloaded try-lock v0.2.2
Downloaded ppv-lite86 v0.2.6
Downloaded version_check v0.9.1
Downloaded unicode-bidi v0.3.4
Downloaded futures-sink v0.3.4
Downloaded pin-project-internal v0.4.8
Downloaded proc-macro-error-attr v0.4.12
Downloaded scroll_derive v0.10.1
Downloaded indexmap v1.3.2
Downloaded untrusted v0.7.0
Downloaded unicode-segmentation v1.6.0
Downloaded unicode-normalization v0.1.12
Downloaded winapi v0.3.8
Downloaded backtrace-sys v0.1.35
Downloaded quick-error v1.2.3
Downloaded syn-mid v0.5.0
Downloaded autocfg v1.0.0
Downloaded cc v1.0.50
Downloaded smallvec v1.2.0
Downloaded ring v0.16.12
Downloaded spin v0.5.2
Compiling libc v0.2.68
Compiling proc-macro2 v1.0.10
Compiling log v0.4.8
Compiling unicode-xid v0.2.0
Compiling memchr v2.3.3
Compiling syn v1.0.17
Compiling cc v1.0.50
Compiling cfg-if v0.1.10
Compiling autocfg v1.0.0
Compiling slab v0.4.2
Compiling proc-macro-nested v0.1.4
Compiling version_check v0.9.1
Compiling getrandom v0.1.14
Compiling spin v0.5.2
Compiling bytes v0.5.4
error[E0432]: unresolved import `std::io::IoSlice`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_impl.rs:4:5
|
4 | use std::io::IoSlice;
| ^^^^^^^^^^^^^^^^ no `IoSlice` in `io`
error[E0432]: unresolved import `std::io::IoSlice`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/ext/chain.rs:7:15
|
7 | use std::io::{IoSlice};
| ^^^^^^^ no `IoSlice` in `io`
error[E0433]: failed to resolve: could not find `IoSliceMut` in `io`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1075:29
|
1075 | IoSliceMut(std::io::IoSliceMut::new(buf))
| ^^^^^^^^^^ could not find `IoSliceMut` in `io`
error[E0433]: failed to resolve: could not find `IoSliceMut` in `io`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1082:29
|
1082 | IoSliceMut(std::io::IoSliceMut::new(unsafe {
| ^^^^^^^^^^ could not find `IoSliceMut` in `io`
error[E0412]: cannot find type `IoSliceMut` in module `std::io`
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1061:36
|
1061 | pub struct IoSliceMut<'a>(std::io::IoSliceMut<'a>);
| ^^^^^^^^^^ not found in `std::io`
help: possible candidate is found in another module, you can import it into scope
|
1 | use crate::buf::buf_mut::IoSliceMut;
|
error[E0658]: naming constants with `_` is unstable (see issue #54912)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/bytes.rs:911:1
|
911 | const _: [(); 0 - mem::align_of::<Shared>() % 2] = []; // Assert that the alignment of `Shared` is divisible by 2.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'alloc': this library is unlikely to be stabilized in its current form or name (see issue #27783)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/lib.rs:76:1
|
76 | extern crate alloc;
| ^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1:29
|
1 | use core::{cmp, mem::{self, MaybeUninit}, ptr, usize};
| ^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1080:24
|
1080 | impl<'a> From<&'a mut [MaybeUninit<u8>]> for IoSliceMut<'a> {
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:165:38
|
165 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>];
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:970:38
|
970 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1003:38
|
1003 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1013:45
|
1013 | let ptr = self.as_mut_ptr() as *mut MaybeUninit<u8>;
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1081:27
|
1081 | fn from(buf: &'a mut [MaybeUninit<u8>]) -> IoSliceMut<'a> {
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:1085:39
|
1085 | mem::transmute::<&'a mut [MaybeUninit<u8>], &'a mut [u8]>(buf)
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:880:38
|
880 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^
...
956 | deref_forward_bufmut!();
| ------------------------ in this macro invocation
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/buf_mut.rs:880:38
|
880 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^
...
960 | deref_forward_bufmut!();
| ------------------------ in this macro invocation
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/ext/chain.rs:4:5
|
4 | use core::mem::MaybeUninit;
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/ext/chain.rs:189:38
|
189 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/ext/limit.rs:3:17
|
3 | use core::{cmp, mem::MaybeUninit};
| ^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/buf/ext/limit.rs:66:38
|
66 | fn bytes_mut(&mut self) -> &mut [MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/bytes_mut.rs:909:47
|
909 | fn maybe_uninit_bytes(&mut self) -> &mut [mem::MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/bytes_mut.rs:914:51
|
914 | slice::from_raw_parts_mut(ptr as *mut mem::MaybeUninit<u8>, len)
| ^^^^^^^^^^^^^^^^^^^^
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/bytes_mut.rs:977:38
|
977 | fn bytes_mut(&mut self) -> &mut [mem::MaybeUninit<u8>] {
| ^^^^^^^^^^^^^^^^^^^^
Compiling lazy_static v1.4.0
error: aborting due to 24 previous errors
Some errors occurred: E0412, E0432, E0433, E0658.
For more information about an error, try `rustc --explain E0412`.
error: Could not compile `bytes`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 182, in build_wheel
metadata_directory)
File "/tmp/pip-build-env-fmh7uvxq/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 209, in build_wheel
wheel_directory, config_settings)
File "/tmp/pip-build-env-fmh7uvxq/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 194, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-fmh7uvxq/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 97, in <module>
zip_safe=False,
File "/tmp/pip-build-env-fmh7uvxq/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-fmh7uvxq/overlay/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 228, in run
self.run_command('install')
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 58, in run
["cargo", "rustc", "--bin", "maturin", "--", "-C", "link-arg=-s"]
File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cargo', 'rustc', '--bin', 'maturin', '--', '-C', 'link-arg=-s']' returned non-zero exit status 101.
----------------------------------------
ERROR: Failed building wheel for maturin
Failed to build maturin
ERROR: Could not build wheels for maturin which use PEP 517 and cannot be installed directly
ERROR: Service 'server' failed to build: The command '/bin/sh -c pip install maturin' returned a non-zero code: 1
Why do I need Rust in this situation?
Poetry doesn't depend on Rust.
But you are depending on orjson, which is implemented, at least partly, in Rust. As a result, installing it from source¹ requires a Rust toolchain and the maturin build tool.
Add pip install maturin back to your Dockerfile as it was before or, better yet, add it to your project's dependencies.
You will also need to install cargo. A multi-stage build might be the best solution, but the simplest is probably to install packages into the existing image, e.g. via something like
RUN apt-get install cargo
in your Dockerfile.
¹Binary wheels might be available for some platforms, in which case the Rust tooling presumably wouldn't be required, but since pip is trying to build from source I suspect no compatible wheels are available for ARM.

Categories