Is there a way to fix this error? I'm trying to understand it but don't really know - anaconda3

ERROR: Command errored out with exit status 1:
command: 'C:\Users\panda\anaconda3\envs\dmodel\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\panda\AppData\Local\Temp\pip-req-build-0lhigfqj\bindings/torch\setup.py'"'"'; file='"'"'C:\Users\panda\AppData\Local\Temp\pip-req-build-0lhigfqj\bindings/torch\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'"'"'))' egg_info --egg-base 'C:\Users\panda\AppData\Local\Temp\pip-pip-egg-info-h3yznucj'
cwd: C:\Users\panda\AppData\Local\Temp\pip-req-build-0lhigfqj\bindings/torch
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\panda\AppData\Local\Temp\pip-req-build-0lhigfqj\bindings/torch\setup.py", line 41, in
raise RuntimeError("Could not locate a supported Microsoft Visual C++ installation")
RuntimeError: Could not locate a supported Microsoft Visual C++ installation
Building PyTorch extension for tiny-cuda-nn version 1.6
----------------------------------------
WARNING: Discarding git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Related

ruamel.yaml w/out C compiler on ARM

I am trying to install ruamel.yaml on a raspberry Pi system without a C compiler and encounter a build error installing ruamel.yaml.clib (pasted below).
I see this was previously addressed for ruamel.yaml>=0.15.41, <0.16.0 (How to install ruamel.yaml w/o native extension).
Note in the output below that the path from buildroot is not valid on the device running pip install but is from the device that built the image.
$ pip install ruamel.yaml~=0.16
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting ruamel.yaml~=0.16
Using cached ruamel.yaml-0.17.10-py3-none-any.whl (108 kB)
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.10"
Using cached ruamel.yaml.clib-0.2.6.tar.gz (180 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/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 /tmp/pip-pip-egg-info-zdtfb19x
cwd: /tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/
Complete output (3 lines):
sys.argv ['/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-zdtfb19x']
test compiling /tmp/tmp_ruamel_5les1064/test_ruamel_yaml.c -> test_ruamel_yaml compile error: /tmp/tmp_ruamel_5les1064/test_ruamel_yaml.c
Exception: command '{path from buildroot}/aarch64-buildroot-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
A preferred solution would be to have a ruamel.yaml.clib wheel for ARM architectures or to make clib dependency optional (pip install ruamel.yaml[clib])
I'm not sure why this broke after 0.16, but I'll try to have a look as to why this fails again (it might be that setuptools now throws a different Exception that is not caught).
Wheels for ruamel.yaml.clib in aarch64 architecture are availalbe on piwheels.
You should be able to install those after adding:
[global]
extra-index-url=https://www.piwheels.org/simple
to /etc/pip.conf.
Disclaimer: I have no control over how wheels on piwheels are generated.

ERROR: Command errored out with exit status 1: python setup.py egg_info; update setuptools doesn't work

I'm trying to install a private python module with command: "pip install . -i "private url" "
I had this error:
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-rnoryb6e\
I uninstall Python 38 and reinstall it.
Pip is updated and setup_tools is also updated.
And now I have this error:
D:\L1\onelib\trx-5g>D:\L1\onelib\venv\Scripts\pip.exe install . -i https://artifactory-espoo1..com/artifactory/api/pypi/ulphy-pypi-prod-virtual/simple
Looking in indexes:
https://artifactory-espoo1..com/artifactory/api/pypi/ulphy-pypi-prod-virtual/simple,
https://artifactory-espoo2.***********.com/artifactory/ap
i/pypi/mn-l1-pz-int-lib-local/simple Processing d:\l1\onelib\trx-5g
ERROR: Command errored out with exit status 1:
command: 'd:\l1\onelib\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\se
tup.py'"'"';
file='"'"'C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(file);code=f.read().repla ce('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
egg_info --egg-base
'C:\Users\hwi_pi\AppData\Local\Temp\pip-pip-egg-info-zvlq1hsf'
cwd: C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py",
line 23, in
version=os.environ.get('CI_COMMIT_TAG', f'0.0.0+{get_local_version_label()}'),
File "C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py",
line 17, in get_local_version_label
commit_hash = subprocess.check_output(COMMAND.split()).decode('utf-8').strip()
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for
full command output.
Where the logs are located ?
I'm on Windows 10.
Python 3.8.5.
I launched this command via Pycharm and via cmd windows and same result.
I tried to run the command in administration mode; and same result.
I have tried every solution available on stackoverflow and nothing solves my error.
I tried to find C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py to see the file setup.py but foled pip-req-build-_4yae_lz doesn't exist.
I can access to https://artifactory-espoo1.************.com/artifactory/api/pypi/ulphy-pypi-prod-virtual/simple via firefox; but I can't download it in .zip for example
Someone to help please ?

Error installing AutoitLibrary through command line

I need to install robotframework-autoitlibrary to use on my test cases.
My problem is when I try to install AutoIt Library through command line with the following command:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre
I have this error:
C:\windows\system32>pip install -U robotframework-autoitlibrary --no-cache-
dir --pre
Collecting robotframework-autoitlibrary
Downloading
https://files.pythonhosted.org/packages/4e/a4/9e51fe35b1da7a006b773c9c234f78e89bcc4f267152c4e9fa8260631fa8/robotframework-autoitlibrary-1.2.2.zip (701kB)
100% |################################| 706kB 1.6MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user-a~1\appdata\local\temp\pip-install-
oro1ov\robotframework-autoitlibrary\setup.py", line 93, in <module>
destPath = os.path.normpath(os.path.join(os.getenv("HOMEDRIVE"),
r"\RobotFramework\Extensions\AutoItLibrary"))
File "c:\python27\lib\ntpath.py", line 65, in join
result_drive, result_path = splitdrive(path)
File "c:\python27\lib\ntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
c:\users\user-a~1\appdata\local\temp\pip-install-oro1ov\robotframework-
autoitlibrary\
My currently installed python packages and their versions are:
Pillow==5.3.0
Pygments==2.3.1
pypiwin32==223
Pypubsub==4.0.0
pywin32==224
robotframework==3.1
robotframework-ride==1.5.2.1
robotframework-selenium2library==3.0.0
robotframework-seleniumlibrary==3.3.0
selenium==3.141.0
six==1.12.0
typing==3.6.6
urllib3==1.24.1
wxPython==4.0.3
I already try this command:
pip install --upgrade setuptools
When input echo %HOMEDRIVE%, the output is:
C:\Users\cmpeixoto>echo %HOMEDRIVE%
C:
Thanks for your help,
The error looks like the environment variable HOMEDRIVE is not set, even though it has a value according to your test (the library installer uses it to copy some files).
Can you try this - manually set it, and straight after that run the pip - in the same Command Prompt (cmd) session:
set HOMEDRIVE=C:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre

when i wanted run blinking_led.py i got this error

Hello everyone when i wanted to run blinking_led.py in python-opencv in windows 10 i faced this problem:
Traceback (most recent call last): File
"C:\Users\LifeSTYLE\AppData\Local\Programs\Python\Python36\TEST\blinking_led.py",
line 1, in
import RPi.GPIO as GPIO #Import raspberry Pi GPIO library ModuleNotFoundError: No module named 'RPi'
After that i have tried to install RPi.GPIO i faced this problem too:
error: command 'C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe'
failed with exit status 2
[error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
Command "c:\users\lifestyle\appdata\local\programs\python\python36\python.exe
-u -c "import setuptools, tokenize;file='C:\Users\LIFEST~1\AppData\Local\Temp\pip-install-8sq29xb7\rpi.gpio\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\LIFEST~1\AppData\Local\Temp\pip-record-t7ye6d1q\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
C:\Users\LIFEST~1\AppData\Local\Temp\pip-install-8sq29xb7\rpi.gpio]1
If anyone could help please help!
I could not find any useful suggestion.
Thanks beforehand!!!
You can not use module RPi.GPIO on Windows machine, because there is no GPIO interface.
It will only works with Raspberry Pi.

Installing awscli without internet

I am trying to install awscli on a RHEL machine.
Python 2.7.5 is installed, the machine does not have internet access.
I have installed setuptools 38.5.2 and setuptools_scm 1.15.7 from sources successfully.
Here is the command I have tried to run when installing:
sudo /usr/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws sudo awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Both are exiting with the following issue:
Running cmd: /usr/bin/python virtualenv.py --no-download --python /usr/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///home/talendmaster/QlikSensePOC/awscli-bundle/packages awscli-1.14.54.tar.gz
Traceback (most recent call last):
File "awscli-bundle/install", line 143, in <module>
main()
File "awscli-bundle/install", line 132, in main
pip_install_packages(opts.install_dir)
File "awscli-bundle/install", line 100, in pip_install_packages
pip_script, PACKAGES_DIR, cli_tarball))
File "awscli-bundle/install", line 45, in run
p.returncode, cmd, stdout + stderr))
__main__.BadRCError: Bad rc (1) for cmd '/usr/local/aws/bin/pip install --no-index --find-links file:///home/talendmaster/QlikSensePOC/awscli-bundle/packages awscli-1.14.54.tar.gz': Processing ./awscli-1.14.54.tar.gz
Collecting botocore==1.9.7 (from awscli==1.14.54)
Collecting colorama<=0.3.7,>=0.2.5 (from awscli==1.14.54)
Collecting docutils>=0.10 (from awscli==1.14.54)
Collecting rsa<=3.5.0,>=3.1.2 (from awscli==1.14.54)
Collecting s3transfer<0.2.0,>=0.1.12 (from awscli==1.14.54)
Collecting PyYAML<=3.12,>=3.10 (from awscli==1.14.54)
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.9.7->awscli==1.14.54)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.9.7->awscli==1.14.54)
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [Errno 101] Network is unreachable -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-kh_Hg9/python-dateutil/setup.py", line 67, in <module>
"test": Unsupported
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kh_Hg9/python-dateutil/
It seems to be related to setuptools_scm but reinstallation did not change anything. The internet access shouldn't be a problem since I have successfully installed a local version of the package.
I have just finished installing AWS CLI tools on an old RHEL 5.10 machine, this works for me as on date.
$ curl -LO https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Running cmd: /root/aws/bin/python virtualenv.py --no-download --python /root/aws/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///root/awscli-bundle/packages/setup setuptools_scm-1.15.7.tar.gz
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///root/awscli-bundle/packages awscli-1.15.68.tar.gz
You can now run: /usr/local/bin/aws --version
$ aws --version
aws-cli/1.15.68 Python/2.6.8 Linux/2.6.18-363.el5 botocore/1.10.67
References:
https://medium.com/#vikas027/aws-cli-tools-in-rhel-centos-5-cd4b9beeb096 (my post)
https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html#install-bundle-other