nvidia-pyindex installed unsuccessfully on win10 - triton

I want to install tritonclient according to client_libraries.md on win10. Errors happened when I install nvidia-pyindex. How to solve it? Thanks!
(py38trtc250) G:\client_py>pip install --user nvidia-pyindex
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting nvidia-pyindex
Using cached https://mirrors.aliyun.com/pypi/packages/64/4c/dd413559179536b9b7247f15bf968f7e52b5f8c1d2183ceb3d5ea9284776/nvidia-pyindex-1.0.5.tar.gz (6.1 kB)
Building wheels for collected packages: nvidia-pyindex
Building wheel for nvidia-pyindex (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\envs\py38trtc250\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"'; __file__='"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\15151\AppData\Local\Temp\pip-wheel-cho7jhkv'
cwd: C:\Users\15151\AppData\Local\Temp\pip-install-a7e_bahh\nvidia-pyindex\
Complete output (25 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\nvidia_pyindex
copying nvidia_pyindex\cmdline.py -> build\lib\nvidia_pyindex
copying nvidia_pyindex\utils.py -> build\lib\nvidia_pyindex
copying nvidia_pyindex\__init__.py -> build\lib\nvidia_pyindex
running egg_info
writing nvidia_pyindex.egg-info\PKG-INFO
writing dependency_links to nvidia_pyindex.egg-info\dependency_links.txt
writing entry points to nvidia_pyindex.egg-info\entry_points.txt
writing top-level names to nvidia_pyindex.egg-info\top_level.txt
reading manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
installing to build\bdist.win-amd64\wheel
running install
'"nvidia_pyindex uninstall"' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error: [WinError 2] 系统找不到指定的文件。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMAND: InstallCommand
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
----------------------------------------
ERROR: Failed building wheel for nvidia-pyindex
Running setup.py clean for nvidia-pyindex
Failed to build nvidia-pyindex
Installing collected packages: nvidia-pyindex
Running setup.py install for nvidia-pyindex ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\envs\py38trtc250\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"'; __file__='"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\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\15151\AppData\Local\Temp\pip-record-ma8cx0c0\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\15151\AppData\Roaming\Python\Python38\Include\nvidia-pyindex'
cwd: C:\Users\15151\AppData\Local\Temp\pip-install-a7e_bahh\nvidia-pyindex\
Complete output (7 lines):
running install
'"nvidia_pyindex uninstall"' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error: [WinError 2] 系统找不到指定的文件。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMAND: InstallCommand
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Anaconda\envs\py38trtc250\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"'; __file__='"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\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\15151\AppData\Local\Temp\pip-record-ma8cx0c0\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\15151\AppData\Roaming\Python\Python38\Include\nvidia-pyindex' Check the logs for full command output.

Related

RobotFramework Browser library installation failed ERROR: Command errored out with exit status 1

I Tryed to install Robotframework browser (win10 enviroment).
Nodejs installation goes ok. But in "pip install robotframework-browser" After this step installation exits with statuscode 1:
Installing collected packages: grpcio, wrapt, typing-extensions, robotframework-pythonlibcore, robotframework-assertion-engine, overrides, grpcio-tools, backports.cached-property, robotframework-browser
Running setup.py install for grpcio ... error
ERROR: Command errored out with exit status 1:
ERROR: Command errored out with exit status 1: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\x\AppData\Local\Temp\pip-install-h6_hezr8\grpcio_55999491d4194df7ab59a8dcd0fe4e6e\setup.py'"'"'; file='"'"'C:\Users\x\AppData\Local\Temp\pip-install-h6_hezr8\grpcio_55999491d4194df7ab59a8dcd0fe4e6e\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\x\AppData\Local\Temp\pip-record-agotwqfa\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\grpcio' Check the logs for full command output.
Any ideas how to fix it
Check if the library is compatible with Python 3.10.
Try a lower version of Python.

Error when installing python ldap package

I am trying to install python-ldap on ubuntu 20.04
pip3 install python-ldap
It complains about this command error
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -Qunused-arguments -Qunused-arguments -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/home/jlin/virtualenvs/pmas/include -I/usr/include/python3.8 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.8/Modules/LDAPObject.o
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-Qunused-arguments’
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-Qunused-arguments’
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/jlin/virtualenvs/pmas/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mw_idota/python-ldap_10d1d5b1c1324cd5b7e42a23e6d0db58/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mw_idota/python-ldap_10d1d5b1c1324cd5b7e42a23e6d0db58/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-dfol907l/install-record.txt --single-version-externally-managed --compile --install-headers /home/jlin/virtualenvs/pmas/include/site/python3.8/python-ldap Check the logs for full command output.
Looks like problem with
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-Qunused-arguments’
Searched on Google but not many good answers about this typical error.
I have tried to copied the actual command and run it locally
/home/jlin/virtualenvs/pmas/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mw_idota/python-ldap_10d1d5b1c1324cd5b7e42a23e6d0db58/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mw_idota/python-ldap_10d1d5b1c1324cd5b7e42a23e6d0db58/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-dfol907l/install-record.txt --single-version-externally-managed --compile --install-headers /home/jlin/virtualenvs/pmas/include/site/python3.8/python-ldap
I got the following output
running install
running build
running install_egg_info
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing top-level names to UNKNOWN.egg-info/top_level.txt
reading manifest file 'UNKNOWN.egg-info/SOURCES.txt'
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
removing '/home/jlin/virtualenvs/pmas/lib/python3.8/site-packages/UNKNOWN-0.0.0-py3.8.egg-info' (and everything under it)
Copying UNKNOWN.egg-info to /home/jlin/virtualenvs/pmas/lib/python3.8/site-packages/UNKNOWN-0.0.0-py3.8.egg-info
running install_scripts
writing list of installed files to '/tmp/pip-record-dfol907l/install-record.txt'
error: [Errno 2] No such file or directory: '/tmp/pip-record-dfol907l/install-record.txt'
It looks like it was trying to write to a file in /tmp folder but it didnt?
What I have tried:
Searched on GOOGLE and SO to installed extra suggested apt packages, such as build-essentials python3.8-dev libsasl2-dev python3-dev libldap2-dev libssl-dev
but did not solve my problem.
Not directly answering my own question but I figured there is a python package python3-ldap which installed without problem.

Failed to 'pip3 install rpy2' in linux

everyone. I tried to install rpy2 in Centos6.10, with Python 3.6.4 and R version 3.5.2. I used the comand 'pip3 install rpy2'. I got the following errors:
cwd: /tmp/pip-install-7bxzxlni/rpy2_0e939a480cc0488d918a202af1b64127/
Complete output (153 lines):
['cffi>=1.10.0', 'jinja2', 'pytz', 'tzlocal']
running install
running build
cffi mode: CFFI_MODE.ANY
running build_py
file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/rpy2
...(many copy information like this "copying ./rpy2/rinterface_lib/memorymanagement.py -> build/lib.linux-x86_64-3.6/rpy2/rinterface_lib")
file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found
generating cffi module 'build/lib.linux-x86_64-3.6/_rinterface_cffi_abi.py'
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/_rinterface_cffi_api.c'
creating build/temp.linux-x86_64-3.6
building '_rinterface_cffi_api' extension
creating build/temp.linux-x86_64-3.6/build
creating build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O2 -pipe -fPIC -DRPY2_RLEN_LONG=True -DR_INTERFACE_PTRS=True -Irpy2/rinterface_lib/ -I/home/work/.jumbo/include/python3.6m -c build/temp.linux-x86_64-3.6/_rinterface_cffi_api.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_rinterface_cffi_api.o
In file included from build/temp.linux-x86_64-3.6/_rinterface_cffi_api.c:569:
rpy2/rinterface_lib/R_API.h:199: warning: function declaration isn’t a prototype
In file included from build/temp.linux-x86_64-3.6/_rinterface_cffi_api.c:570:
rpy2/rinterface_lib/R_API_eventloop.h:26: error: redefinition of typedef ‘InputHandler’
rpy2/rinterface_lib/R_API_eventloop.h:8: note: previous declaration of ‘InputHandler’ was here
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/work/.jumbo/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7bxzxlni/rpy2_0e939a480cc0488d918a202af1b64127/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7bxzxlni/rpy2_0e939a480cc0488d918a202af1b64127/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-lx5dv6cc/install-record.txt --single-version-externally-managed --compile --install-headers /home/work/.jumbo/include/python3.6m/rpy2 Check the logs for full command output.
'''
Since there is "command 'gcc' failed with exit status 1", I installed all things mentioned in here. Since "Command errored out with exit status 1", I referred here~, e.g, I have tried 'pip3 install --upgrade rpy2' and I also tried to first upgrade my pip3. But these ways did not help me. Besides, I followed by this way and this~. The first did not help and the latter will pose 'error: option --r-home not recognized' after my command 'python3 setup.py build --r-home /usr/lib64/R/ install'.
Here is some other information:
echo$PATH
bash:echo/home/work/.jumbo/bin/core_perl:/home/work/.jumbo/bin:/home/work/.jumbo/bin/core_perl:/home/work/.jumbo/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/opt/bin:/home/opt/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin:/home/opt/bin:/usr/local/git/bin:/home/work/bin: No such file or directory
echo$R_HOME
bash: echo/usr/lib64/R: No such file or directory
echo$LD_LIBRARY_PATH
Please help me!
I get my "R_HOME" by starting R and input 'Sys.getenv("R_HOME")'. The output is "/usr/lib64/R". This is why I creat the variable "R_HOME" by "export R_HOME=/usr/lib64/R" in my /etc/profile. Now I use 'which R' and I get '/usr/bin/R', so I changed "R_HOME" variable from "/usr/lib64/R" into "/usr/bin/" which solved my problem! Oh yeah! I hope my experience can help some guys.

"How to fix 'error: command 'gcc' failed with exit status 1' while installing "SudachiPy" python package?

I am working in building Japanese NLP sentiment analysis, to tokenise the Japanese sentence we have a package called "SudachiPy".I tried to install it but I am getting error while installing the package. I'm using anaconda in MAC Book pro.
I tried all the steps mentioned in stack overflow by installing following libraries to debug the error.
pip3 install python3-dev
Also I tried launching an "Ubuntu" instance from AWS and try to install "SudachiPy" but still encountering the same error.
pip3 install SudachiPy
Building wheels for collected packages: dartsclone
Building wheel for dartsclone (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/lf/4754h1x94x39xfw_q6c8_ryc0000gn/T/pip-install-st3sqcmm/dartsclone/setup.py'"'"'; __file__='"'"'/private/var/folders/lf/4754h1x94x39xfw_q6c8_ryc0000gn/T/pip-install-st3sqcmm/dartsclone/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 /private/var/folders/lf/4754h1x94x39xfw_q6c8_ryc0000gn/T/pip-wheel-x8k1ryul --python-tag cp36
cwd: /private/var/folders/lf/4754h1x94x39xfw_q6c8_ryc0000gn/T/pip-install-st3sqcmm/dartsclone/
Complete output (25 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/dartsclone
copying dartsclone/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/dartsclone
running build_ext
cythoning dartsclone/_dartsclone.pyx to dartsclone/_dartsclone.cpp
/anaconda3/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/lf/4754h1x94x39xfw_q6c8_ryc0000gn/T/pip-install-st3sqcmm/dartsclone/dartsclone/_dartsclone.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: dartsclone/_dartsclone.pyx:119:49: local variable 'result' referenced before assignment
warning: dartsclone/_dartsclone.pyx:120:15: local variable 'result' referenced before assignment
building 'dartsclone._dartsclone' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/dartsclone
creating build/temp.macosx-10.7-x86_64-3.6/csrc
creating build/temp.macosx-10.7-x86_64-3.6/csrc/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I./csrc/include -I/anaconda3/include/python3.6m -c dartsclone/_dartsclone.cpp -o build/temp.macosx-10.7-x86_64-3.6/dartsclone/_dartsclone.o
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
dartsclone/_dartsclone.cpp:610:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for dartsclone
You need to install some deps before, similar to Linux build-essential:
xcode-select install
Also, you may need to specify the right compiler, by setting this env. variable:
CFLAGS='-stdlib=libc++'

Error setting up environment on Google Cloud Shell to use Cloud ML

Following instructions from https://cloud.google.com/ml/docs/how-tos/getting-set-up:
Created a project and started the Cloud Shell.
Ran below script to Install required tools and dependencies
curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | bash
Expected outcome >>
"Success! Your environment has the required tools and dependencies." when the script finishes successfully.
Actual outcome >>
+ pip install --user --upgrade 'pillow>=3.4.2' --global-option=build_ext --global-option=--disable-jpeg
/usr/local/lib/python2.7/dist-packages/pip-8.1.1- py2.7.egg/pip/commands/install.py:180: UserWarning: Disabling all use of wheels due to the use of --build-options / --g
lobal-options / --install-options.
cmdoptions.check_install_build_global(options)
Collecting pillow>=3.4.2
Using cached Pillow-4.0.0.tar.gz
Collecting olefile (from pillow>=3.4.2)
Using cached olefile-0.43.zip
Installing collected packages: olefile, pillow
Running setup.py install for olefile ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build- KwQqVS/olefile/setup.py';exec(compile(getattr(tokenize, 'op
en', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" build_ext --disable-jpeg install --record /tmp/pip-eOHYKZ-record/install-record.txt --single-vers
ion-externally-managed --compile --user --prefix=:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --disable-jpeg not recognized
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build- KwQqVS/olefile/setup.py';exec(compile(getattr(tokenize, 'open', open) (__file__).rea
d().replace('\r\n', '\n'), __file__, 'exec'))" build_ext --disable-jpeg install --record /tmp/pip-eOHYKZ-record/install-record.txt --single-version- externally-managed -
-compile --user --prefix=" failed with error code 1 in /tmp/pip-build- KwQqVS/olefile/
I had the same problem and I solved it.
The error came from Pilow.
First you should install Pillow seperately: (with sudo)
sudo pip install --upgrade pillow
Then you run again the command:
curl https://raw.githubusercontent.com/GoogleCloudPlatform/cloudml-samples/master/tools/setup_cloud_shell.sh | bash
Everything will be ok.
The fix has been pushed to Github, the new version did
pip install --user --upgrade pillow,
which doesn't have the '--disable-jpeg' option. It seems that the new version of Pillow fixed the issue mentioned in Fail during installation of Pillow (Python module) in Linux and removed the option.

Resources