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.
Related
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.
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.
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++'
I cannot get Rcpp to work on Windows 8.1. When I run the following minimal example, I get an error.
> library(Rcpp)
> evalCpp("1 + 1")
g++ -m64 -I"C:/R/R-31~1.0/include" -DNDEBUG -I"C:/R/R-3.1.0/library/Rcpp/include" -
I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c file11dc2120723d.cpp -o
file11dc2120723d.o g++: not found make: *** [file11dc2120723d.o] Error 127 Warning message: running
command 'make -f "C:/R/R-31~1.0/etc/x64/Makeconf" -f "C:/R/R-31~1.0/share/make/winshlib.mk"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="sourceCpp_97232.dll" WIN=64 TCLBIN=64
OBJECTS="file11dc2120723d.o"' had status 2
Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput, :
Error 1 occurred building shared library.
The two first entries in my path are:
PATH=c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;
R is installed in a directory C:\R\R-3.1.0
Rtools is in the directory C:\R\Rtools
Some additional information:
> library(devtools)
> find_rtools(T)
Scanning path...
ls : c:\Rtools\bin\ls.exe
Scanning registry...
Found c:/Rtools for 3.1
VERSION.txt
Rtools version 3.1.0.1942
[1] TRUE
> has_devel()
"C:/R/R-31~1.0/bin/x64/R" --vanilla CMD SHLIB foo.c
gcc -m64 -I"C:/R/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include"
O2 -Wall -std=gnu99 -mtune=core2 -c foo.c -o foo.o
gcc: not found
make: *** [foo.o] Error 127
Warning message:
running command 'make -f "C:/R/R-31~1.0/etc/x64/Makeconf" -f "C:/R/R-31~1.0/share/make/winshlib.mk"
SHLIB="foo.dll" WIN=64 TCLBIN=64 OBJECTS="foo.o"' had status 2
Error: Command failed (1)
> system('g++ -v')
Warning message:
running command 'g++ -v' had status 127
Unsure if you have solved your problem but it appears you don't have gcc or g++ installed. For windows you can get these tools with MinGW.
Install MinGW which you can donwload from here. The homepage for information is here
Once you have it installed MinGW, you can open the 'MinGW Installation Manager' and install the bin and dev for 'mingw32-gcc-g++'.
You must then update your PATH environmental variable to include 'C:\MinGW\bin' and 'C:\MinGW\msys\1.0\bin'.
Restart your R session, couldn't hurt to also reinstall 'Rcpp', and tryrequire(Rcpp); evalCpp("1 + 1") again.
I had this problem while trying to call C-code directly. Switching from the function system() to system2() solved it immediately.
I got that fix by installing RTools and adding RBuildTools to the path:
Sys.setenv("PATH" = paste(Sys.getenv("PATH"),
"C:\\RBuildTools\\3.4\\bin",
"C:\\RBuildTools\\3.4\\mingw_32",
"C:\\RBuildTools\\3.4\\mingw_64", sep = ";"))
I don't understand these things clearly but #cdeterman solutions was not working for building my package while its example evalCpp("1 + 1") did.
I am trying to install mySQL for Python on PPC ibook G4 running Leopard. I have Python 2.7.2, XCODE 3.1.3 and MAMP 1.9.6 installed.
I was trying both MySQL-Python-1.2.2 and MySQL-Python-1.2.3, but I am always getting this error:
andreass-ibook-g4:MySQL-python-1.2.3 aed0101$ sudo python setup.py buildrunning build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -isysroot/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/Applications/MAMP/Library/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.3-fat-2.7/_mysql.o -fno-omit-frame-pointer -g
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:38:19: error: mysql.h: No such file or directory
_mysql.c:39:26: error: mysqld_error.h: No such file or directory
...more errors
lipo: can't figure out the architecture type of: /var/tmp//ccM5WtnK.out
error: command 'gcc-4.0' failed with exit status 1
Can anybody help me with this?
Thanks.
It looks like the MySQL development headers are not found. If running mysql_config from the shell gives an error, that's probably why. Make sure mysql_config is on your path or else edit site.cfg and set the correct path in there. Normally setup.py will bail out if mysql_config exits with an error, so it's not clear what happened here.