scikit-learn install: ERROR: Command errored out with exit status 1: - python

I need to install a specific (old) version of scikit-learn, along with other project requirements. I'm using Python3.9. The scikit-learn installation keeps failing, but from the error message, I can't understand what's the problem.
Requirements:
Shapely==1.6.4.post2
numpy==1.19.5
botocore==1.12.68
requests==2.26.0
opencv_python_headless==4.5.1.48
loguru==0.5.3
pika==1.1.0
pandas==1.3.3
tqdm==4.62.3
pytz==2021.1
coloredlogs==15.0.1
boto3==1.9.68
AWSIoTPythonSDK==1.4.9
filterpy==1.4.5
Flask==2.0.1
flask_cors==3.0.10
numba==0.41.0
llvmlite==0.26.0
scikit-learn==0.20.1
Running setup.py install for llvmlite: started
Running setup.py install for llvmlite: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-zs1d0gqg/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-zs1d0gqg/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v0wusznu/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/llvmlite
cwd: /tmp/pip-req-build-zs1d0gqg/
Complete output (29 lines):
running install
running build
got version from file /tmp/pip-req-build-zs1d0gqg/llvmlite/_version.py {'version': '0.26.0', 'full': 'f63f7b0b67bfc159a9cc4e6a9728c67f8c690825'}
running build_ext
/usr/local/bin/python /tmp/pip-req-build-zs1d0gqg/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-req-build-zs1d0gqg/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-req-build-zs1d0gqg/ffi/build.py", line 167, in <module>
main()
File "/tmp/pip-req-build-zs1d0gqg/ffi/build.py", line 157, in main
main_posix('linux', '.so')
File "/tmp/pip-req-build-zs1d0gqg/ffi/build.py", line 107, in main_posix
raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/usr/local/bin/python' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-zs1d0gqg/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-zs1d0gqg/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v0wusznu/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/llvmlite Check the logs for full command output.
I've already installed llvm with apt-get install llvm

Related

Error: Failed building wheel for pythonnet

I am trying to install pythonnet and i can't for some reason and it just gives me this error whenever i try to install it
pip3 install pythonnet
Collecting pythonnet
Using cached pythonnet-2.5.2.tar.gz (1.9 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pycparser in c:\users\0991t\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pythonnet) (2.20)
Building wheels for collected packages: pythonnet
Building wheel for pythonnet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\0991t\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\0991t\\AppData\\Local\\Temp\\pip-install-oqtzzy7u\\pythonnet_3e469843a44f4517b9f84bc86e79df93\\setup.py'"'"'; __file__='"'"'C:\\Users\\0991t\\AppData\\Local\\Temp\\pip-install-oqtzzy7u\\pythonnet_3e469843a44f4517b9f84bc86e79df93\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\0991t\AppData\Local\Temp\pip-wheel-u9mp60rw'
cwd: C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\
Complete output (80 lines):
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.1.0.
Updating NuGet.exe to 6.0.0.
Update successful.
Cannot find the specified version of msbuild: '14'
MSBuild auto-detection: using msbuild version '16.11.2.50704' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin'.
Restoring NuGet package NUnit.ConsoleRunner.3.11.1.
Restoring NuGet package NUnit.3.12.0.
Restoring NuGet package System.ValueTuple.4.5.0.
Restoring NuGet package UnmanagedExports.1.2.7.
Adding package 'NUnit.3.12.0' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Adding package 'NUnit.ConsoleRunner.3.11.1' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Adding package 'UnmanagedExports.1.2.7' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Adding package 'System.ValueTuple.4.5.0' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Added package 'UnmanagedExports.1.2.7' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Added package 'NUnit.ConsoleRunner.3.11.1' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Added package 'System.ValueTuple.4.5.0' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
Added package 'NUnit.3.12.0' to folder 'C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\packages'
NuGet Config files used:
C:\Users\0991t\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
C:\Users\0991t\.nuget\packages\
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Installed:
4 package(s) to packages.config projects
Microsoft (R) Manifest Tool
Copyright (c) Microsoft Corporation.
All rights reserved.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\setup.py", line 630, in <module>
setup(
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\setup.py", line 612, in run
return bdist_wheel.bdist_wheel.run(self)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\setuptools\_distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\setup.py", line 345, in build_extension
manifest = self._get_manifest(dest_dir)
File "C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\setup.py", line 389, in _get_manifest
subprocess.check_call(" ".join(cmd), shell=False)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\mt.exe -inputresource:"C:\Users\0991t\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe" -out:"C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\build\lib.win-amd64-3.9\app.manifest"' returned non-zero exit status 31.
----------------------------------------
ERROR: Failed building wheel for pythonnet
Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\0991t\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\0991t\\AppData\\Local\\Temp\\pip-install-oqtzzy7u\\pythonnet_3e469843a44f4517b9f84bc86e79df93\\setup.py'"'"'; __file__='"'"'C:\\Users\\0991t\\AppData\\Local\\Temp\\pip-install-oqtzzy7u\\pythonnet_3e469843a44f4517b9f84bc86e79df93\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\0991t\AppData\Local\Temp\pip-record-l9hhufpc\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pythonnet'
cwd: C:\Users\0991t\AppData\Local\Temp\pip-install-oqtzzy7u\pythonnet_3e469843a44f4517b9f84bc86e79df93\
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\0991t\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\0991t\\AppData\\Local\\Temp\\pip-install-oqtzzy7u\\pythonnet_3e469843a44f4517b9f84bc86e79df93\\setup.py'"'"'; __file__='"'"'C:\\Users\\0991t\\AppData\\Local\\Temp\\pip-install-oqtzzy7u\\pythonnet_3e469843a44f4517b9f84bc86e79df93\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\0991t\AppData\Local\Temp\pip-record-l9hhufpc\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\0991t\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pythonnet' Check the logs for full command output.
I have tried updating setuptools, pip, and wheel. I have tried a lot of things but i just can't wrap my head around why it is causing this error. I am using the latest pip version and using the latest python version. Im also using the latest setuptools version and the latest wheel version. Sorry i am trying to make my question not mostly code so i can actually post it lol.
This can help you #Thomas.
I had the same issue, this solved my problem and install successfully.
Due to pythonnet version mismatch python 3.10.1 reported this error.
Go to: https://pypi.org/project/pythonnet/
Then Follow these steps:
Open the official website :pythonnet.
Click on the "Download files".
Then download "pythonnet-2.5.2-cp38-cp38-win_amd64.whl" (for 64-bit python version)
Modify file name like this:
Before: pythonnet-2.5.2-cp38-cp38-win_amd64.whl
After: pythonnet-2.5.2-cp310-none-any.whl
And now try to install like: pip install path of the file
ex: pip install C:\users\user5\desktop\pythonnet-2.5.2-cp310-none-any.whl
I hope this help you. All the best.
Original post: https://www.codestudyblog.com/cs2112pyc/1221121223.html

Pip installation error on torch install inside virtualenv on RPi4

I tried installing pytorch using pip inside a python3.7 virtual environment on my Raspberry Pi:
(env_hal) pi#raspberrypi:~ $ python3 -m pip install "torch==1.9.0"
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement torch==1.9.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.9.0
The index pip looks in seems to be the default one. Why is it not listing torch?
Edit:
If I omit the version from the command, it unsuccessfully attempts to install this ominous torch package, which doesnt seem to be pytorch:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
Requirement already satisfied: pyyaml in ./audio/env_hal/lib/python3.7/site-packages (from torch) (5.4.1)
WARNING: The candidate selected for download or install is a yanked version: 'torch' candidate (version 0.1.2.post2 at https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz#sha256=a43e37f8f927c5b18f80cd163daaf6a1920edafcab5102e02e3e14bb97d9c874 (from https://pypi.org/simple/torch/))
Reason for being yanked: 0.1.2 is past it's support date and confuses users on unsupported platforms
Building wheels for collected packages: torch
Building wheel for torch (setup.py): started
Building wheel for torch (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/pi/audio/env_hal/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-6h6ghes1
cwd: /tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "/home/pi/audio/env_hal/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/pi/audio/env_hal/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Failed building wheel for torch
Running setup.py clean for torch
ERROR: Command errored out with exit status 1:
command: /home/pi/audio/env_hal/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: /tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e
Complete output (2 lines):
running clean
error: [Errno 2] No such file or directory: '.gitignore'
----------------------------------------
ERROR: Failed cleaning build dir for torch
Failed to build torch
Installing collected packages: torch
Running setup.py install for torch: started
Running setup.py install for torch: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/pi/audio/env_hal/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-15hetl4d/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/audio/env_hal/include/site/python3.7/torch
cwd: /tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/
Complete output (23 lines):
running install
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "/home/pi/audio/env_hal/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py", line 99, in run
self.run_command('build_deps')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pi/audio/env_hal/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u4qh01at/torch_77171faa079e464a8ea88699d6c51f7e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-15hetl4d/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/audio/env_hal/include/site/python3.7/torch Check the logs for full command output.
Try pip3 uninstall torch first to clean up install/uninstall leftover, and run pip3 install torch again.

AttributeError: 'ParsedRequirement' object has no attribute 'req' in PIP 21.1.1

I am currently upgrading a project from Django 2.1 to Django 2.2. In doing so, I have been getting the following error when doing pip install -r requirements.txt.
Running command git clone -q git://github.com/user/djangocms-comments /tmp/pip-req-build-x00esn
u5
ERROR: Command errored out with exit status 1:
command: /home/user/miniconda3/envs/python-3.6-test-web/bin/python -c 'import io, o
s, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-x00esnu5/setup.py'"'"'; __file__='"
'"'/tmp/pip-req-build-x00esnu5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if o
s.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read
().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_i
nfo --egg-base /tmp/pip-pip-egg-info-xm4vt9bf
cwd: /tmp/pip-req-build-x00esnu5/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-x00esnu5/setup.py", line 188, in <module>
install_requires = [str(ir.req) for ir in requirements]
File "/tmp/pip-req-build-x00esnu5/setup.py", line 188, in <listcomp>
install_requires = [str(ir.req) for ir in requirements]
AttributeError: 'ParsedRequirement' object has no attribute 'req'
----------------------------------------
It appears that the package djangocms_comments is outdated in how it uses pip. I have gathered that much by searching this site. However, I am unsure how to fix this.
The error happens here. Any help or guidance would be appreciated.

LightGBM GPU win10 pip install

I tried to follow the guidelines to build python package based on https://github.com/microsoft/LightGBM/tree/master/python-package.
I've already installed vs2019, cmake 3.17.2 and boost 1.73.0-msvc-14.2-64.exe.
Python version is 3.6.8
pip install lightgbm --install-option=--gpu --install-option="--boost-dir=d:/boost_1_73_0" --install-option="--boost-librarydir=d:/boost_1_73_0/lib64-msvc-14.2"
It gives the following error
ERROR: Command errored out with exit status 1:
command: 'd:\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-wy_duymo\\lightgbm\\setup.py'"'"'; __file__='"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-wy_duymo\\lightgbm\\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\chest\AppData\Local\Temp\pip-record-oyinzk76\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python36\Include\lightgbm' --gpu --boost-dir=d:/boost_1_73_0 -boost-librarydir=d:/boost_1_73_0/lib64-msvc-14.2
cwd: C:\Users\chest\AppData\Local\Temp\pip-install-wy_duymo\lightgbm\
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option -b not recognized
After the '--boost-librarydir' has been fixed, a new error occurred:
ERROR: Command errored out with exit status 1:
command: 'd:\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-rsk81qed\\lightgbm\\setup.py'"'"'; __file__='"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-rsk81qed\\lightgbm\\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\chest\AppData\Local\Temp\pip-record-8v2a16nb\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python36\Include\lightgbm' --gpu --boost-dir=d:/boost_1_73_0 --boost-librarydir=d:/boost_1_73_0/lib64-msvc-14.2
cwd: C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\
Complete output (23 lines):
running install
INFO:LightGBM:Starting to compile the library.
INFO:LightGBM:Starting to compile with Visual Studio 16 2019.
INFO:LightGBM:Starting to compile with Visual Studio 15 2017.
INFO:LightGBM:Starting to compile with Visual Studio 14 2015.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\setup.py", line 345, in <module>
'Topic :: Scientific/Engineering :: Artificial Intelligence'])
File "d:\python36\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "d:\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "d:\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "d:\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\setup.py", line 272, in run
nomp=self.nomp, bit32=self.bit32)
File "C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\setup.py", line 164, in compile_cpp
LOG_NOTICE)))
Exception: Please install Visual Studio or MS Build and all required dependencies first
The full version of error log was saved into C:\Users\chest\LightGBM_compilation.log

error python setup.py egg_info when trying to install shapely

This happens when I try to install Shapely from pip.
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\adami\\AppData\\Local\\Temp\\pip-install-hws7cr7o\\Shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\adami\\AppData\\Local\\Temp\\pip-install-hws7cr7o\\Shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\adami\AppData\Local\Temp\pip-install-hws7cr7o\Shapely\pip-egg-info'
cwd: C:\Users\adami\AppData\Local\Temp\pip-install-hws7cr7o\Shapely\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\adami\AppData\Local\Temp\pip-install-hws7cr7o\Shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\adami\AppData\Local\Temp\pip-install-hws7cr7o\Shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "c:\program files (x86)\python37-32\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Categories