I have a GPU instance running on EC2 and I'm trying to install cudamat.
I've downloaded a copy to my home directory:
git clone https://github.com/cudamat/cudamat
Then I cd into that directory and run:
sudo pip install .
Error is "command 'nvcc' failed with exit status 1.
Heres the full message:
Unpacking /home/ubuntu/cudamat
Running setup.py (path:/tmp/pip-s7db_8yv-build/setup.py) egg_info for package from file:///home/ubuntu/cudamat
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/tmp/pip-s7db_8yv-build
Installing collected packages: cudamat
Running setup.py install for cudamat
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/tmp/pip-s7db_8yv-build
building 'cudamat.libcudamat' extension
nvcc -I/usr/include/python3.4m -c cudamat/cudamat.cu -o build/temp.linux-x86_64-3.4/cudamat/cudamat.o -O --ptxas-options=-v --compiler-options=-fPIC
error: command 'nvcc' failed with exit status 1
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-s7db_8yv-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-nulrhjnl-record/install-record.txt --single-version-externally-managed --compile:
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/tmp/pip-s7db_8yv-build
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/cudamat
copying cudamat/learn.py -> build/lib.linux-x86_64-3.4/cudamat
copying cudamat/__init__.py -> build/lib.linux-x86_64-3.4/cudamat
copying cudamat/cudamat.py -> build/lib.linux-x86_64-3.4/cudamat
running egg_info
creating cudamat.egg-info
writing cudamat.egg-info/PKG-INFO
writing dependency_links to cudamat.egg-info/dependency_links.txt
writing top-level names to cudamat.egg-info/top_level.txt
writing manifest file 'cudamat.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'cudamat.egg-info/SOURCES.txt'
writing manifest file 'cudamat.egg-info/SOURCES.txt'
copying cudamat/cudamat.cu -> build/lib.linux-x86_64-3.4/cudamat
copying cudamat/cudamat_kernels.cu -> build/lib.linux-x86_64-3.4/cudamat
copying cudamat/learn.cu -> build/lib.linux-x86_64-3.4/cudamat
copying cudamat/learn_kernels.cu -> build/lib.linux-x86_64-3.4/cudamat
copying cudamat/rnd_multipliers_32bit.txt -> build/lib.linux-x86_64-3.4/cudamat
running build_ext
building 'cudamat.libcudamat' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/cudamat
nvcc -I/usr/include/python3.4m -c cudamat/cudamat.cu -o build/temp.linux-x86_64-3.4/cudamat/cudamat.o -O --ptxas-options=-v --compiler-options=-fPIC
error: command 'nvcc' failed with exit status 1
There is something wrong with the path. since nvcc was not found.
heres when i type:
echo $PATH
/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Anyone has an idea?
cheers
The error manifests itself only when sudo is used.
sudo changes the $PATH variable, depending on the security policy.
The problem is fixed if the following is used:
sudo env "PATH=$PATH" pip3 install .
nvcc is not configured for sudo access(i may be wrongly phrasing this sentence, but in short nvcc doesnt work with sudo)
there are two solutions to this problem:
Give sudo access to nvcc(which you have mentioned) which may be the inefficient way.
Don't use sudo while installing cudamat instead use the following command when you are inside the cudamat directory.
python setup.py install --user
Note:
While testing after installation dont use import cudamat from the cudamat directory which will through an error saying cudamat/cudamat not found.
It will look in the local directory.
Go to home and use import cudamat it will work
Clone from github
git clone https://github.com/cudamat/cudamat.git
This is only compatible with python 3
Related
Im trying to create a virtual enviorment based on an enviorment.yml file with the command:
"mamba env update -f environment.yml -n cs236781-hw".
The yml file contains this part:
- pip:
- nbmerge
- gym[atari,accept-rom-license,box2d]==0.21.0
which seems to fail as I get this error in my minicinda prompt:
Building wheel for AutoROM.accept-rom-license (pyproject.toml): started
Building wheel for AutoROM.accept-rom-license (pyproject.toml): finished with status 'error'
Failed to build AutoROM.accept-rom-license
Pip subprocess error:
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
ImportError: DLL load failed while importing libtorrent: The specified module could not be found.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
failed
CondaEnvException: Pip failed
Ive tried so many things to fix this (reinstalling conda, python even vscode and its c++ build tools) with no success.
Does anyone have any clue?
I assume you are working on Windows x64?
If yes, you will probably need OpenSSL 1.1.x.
Please try to install e.g. Win64OpenSSL_Light-1_1_1s.exe first, to get the required SSL libraries.
https://slproweb.com/products/Win32OpenSSL.html
Regards,
Konstantin
can someone help me?,
Openstack-ansible git tags 20.0.0 (f2ff7902)
I'm having trouble when running openstack-ansible setup-openstack.yml
Keystone Version 20.0.0
Failure On TASK [os_keystone : Create fernet keys for Keystone] ***********************************************************************************************
fatal: [infra1_keystone_container-54825051]: FAILED! => {"changed": false, "cmd": "/openstack/venvs/keystone-20.0.0/bin/keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone", "msg": "[Errno 2] No such file or directory", "rc": 2}
Why is it missing keystone-manage file?
Then, I tried to run pip install requirement on keystone container but get the following error, here is the command I run on target host and its error
sudo lxc-attach --name infra1_keystone_container-54825051
cd /openstack/venvs/keystone-20.0.0
source /bin/activate
pip install -r requirements.txt
Error:
(keystone-20.0.0) [root#infra1-keystone-container-54825051 keystone-20.0.0]# pip install -r requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting keystone
Using cached https://files.pythonhosted.org/packages/4e/e6/22f5a2ee899c4cca1b20e07458ac72cb267ca5ad162f77affea942161fe9/keystone-16.0.0-py2.py3-none-any.whl
Collecting ldappool
Using cached https://files.pythonhosted.org/packages/a4/f2/e62f2f12a871b7bba62d446a20eec8362cae6fa4c55c3d73c587204dc551/ldappool-2.4.1-py2.py3-none-any.whl
Collecting osprofiler
Using cached https://files.pythonhosted.org/packages/22/83/031090f9e6ecb58c520f5bda37a8260ffc953abe2751c435c429fd5d1a96/osprofiler-2.9.0-py2.py3-none-any.whl
Collecting PyMySQL
Using cached https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl
Collecting pyngus
Using cached https://files.pythonhosted.org/packages/58/b1/336b8f64e7e4efa9b95027af71e02cd4cfacca8f919345badb852381878a/pyngus-2.3.0.zip
Collecting python-memcached
Using cached https://files.pythonhosted.org/packages/f5/90/19d3908048f70c120ec66a39e61b92c253e834e6e895cd104ce5e46cbe53/python_memcached-1.59-py2.py3-none-any.whl
Collecting python-openstackclient
Using cached https://files.pythonhosted.org/packages/9b/09/c45ba3f9436f5b26691a4b1a309c959903bda6d8a5be04eec14f32db451a/python-openstackclient-5.2.0.tar.gz
Collecting systemd-python
Using cached https://files.pythonhosted.org/packages/e8/a8/00ba0f605837a8f69523e6c3a4fb14675a6430c163f836540129c50b3aef/systemd-python-234.tar.gz
ERROR: Command errored out with exit status 1:
command: /openstack/venvs/keystone-20.0.0/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-QecSqm/systemd-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-QecSqm/systemd-python/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-install-QecSqm/systemd-python/pip-egg-info
cwd: /tmp/pip-install-QecSqm/systemd-python/
Complete output (12 lines):
Cannot find libsystemd or libsystemd-journal:
Package libsystemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd' found
Package libsystemd-journal was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd-journal.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd-journal' found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.3; however, version 20.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The target host machine is CentOS 7
This error happens because there is a task on ansible install venv packages from repo_server, my repo_server is on lxc_container on infra1 host, it cant be reached, when the package search for repo on 10.0.0.246( infra1 host) it failed to get the repo inside infra1_host, because I need a load balance for it, So I added haproxy by following the openstack-ansible documentation, then repo_server now can be reached and the error is fixed.
Below solution shouldn't be used since error shouldnt happen if the installation is followed correctly.
I tried to overcome error of
pip install -r requirements.txt
I am missing systemd-devel, after running on keystone lxc container
sudo yum install systemd-devel
and manually pip install -r requirements.txt again ( I think this is not needed)
I passed that task
Note: I asked on openstack-ansible channel, then someone good help me and give tips that
I need to be careful using pip like that, you've not use the
constraints / global-constraints files and
in general we would never do that, use the ansible playbooks (and the related python_venv_build ansible role) to manage the contents of the virtualenvs
I am trying to install sentry by following the instruction from the link:
However when I try to execute command pip install -U sentry, I receive the error InstallationError: Command python setup.py egg_info failed with error code 1 in /webapps/sentry/env/build/symsynd
Here is the detail from log file:
self.run_setup(setup_script, setup_base, args)
File "/webapps/sentry/env/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1003, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with 1
Complete output from command python setup.py egg_info:
unable to execute 'clang': No such file or directory
unable to execute 'clang': No such file or directory
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
It would be nice if someone can figure out what am I doing wrong.
Thank you,
Vady
You need a C compiler to build the symsynd dependency.
If you are on a Debian based distribution (Ubuntu, etc.) just do :
sudo apt-get install clang
It seems that specifying a C compiler will be ok, but not. In some packages clang is hard-coded. The only way is to install clang.
I was able to build the most recent version of QScintilla (2.9.1) on Ubuntu 15.10. I have tried building the same version on Windows 10 using Qt 5.6. QMake run to completion without giving errors. A call to Make gives the following error message:
make -f Makefile.Release
make[1]: Entering directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
Makefile.Release:822: *** missing separator. Stop.
make[1]: Leaving directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
makefile:34: recipe for target 'release' failed
make: *** [release] Error 2
What am I doing wrong? How can I solve it?
I ran into similar issues. I eventually got a working 'QScintilla' on my Windows 10 machine as described below.
My PC has the following specifications:
Windows 10, 64-bit OS
Anaconda package installed (Python 3.5)
PyQt5 installed (download the .exe installer from https://www.riverbankcomputing.com/software/pyqt/download5)
STEP 1:
Download the file QScintilla-2.9.2-cp35-none-win_amd64.whl from the site https://pypi.python.org/pypi/QScintilla .
Put the file in the folder:
C: \ .. \ Anaconda \ Scripts \
We will use this .whl file to do the installation of QScintilla.
_
STEP 2:
Open the Windows cmd tool with Administrator privileges! Now type the following command:
> cd "C:\..\Anaconda\Scripts"
This brings the cmd shell to the right spot. Now type the following command:
> pip3 install QScintilla
If all goes well, you get the following message:
> pip3 install QScintilla
Collecting QScintilla
Downloading QScintilla-2.9.2-cp35-none-win_amd64.whl (1.6MB)
100% |################################| 1.6MB 984kB/s
Collecting PyQt5 (from QScintilla)
Downloading PyQt5-5.6-cp35-none-win_amd64.whl (74.7MB)
100% |################################| 74.7MB 23kB/s
Collecting sip (from PyQt5->QScintilla)
Downloading sip-4.18-cp35-none-win_amd64.whl (46kB)
100% |################################| 51kB 5.7MB/s
Installing collected packages: sip, PyQt5, QScintilla
..
Successfully installed PyQt5-5.6 QScintilla-2.9.2 sip-4.18
_
STEP 3:
I did not get the message "Successfully installed" from the first shot. Instead I got the following error message:
PermissionError: [Errno 13] Permission denied: 'C:\..\anaconda\Lib\site-packages\sip.pyd'
Apparently the file sip.pyd sitting in the directory C:\..\anaconda\Lib\site-packages could not be accessed. So I opened another Windows command shell (of course again with Administrator privileges!) and typed the following command:
> icacls "C:\..\Anaconda\Lib\site-packages" /grant "Administrators":(OI)(CI)F /T
This command will give full access rights (read - modify and write) to all "Administrator" users for all the files in the site-packages folder, and all the files in its subfolders. While this command executes, you should get the following messages:
...
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\readline.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\simplegeneric.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\six.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_path.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_pycosat.cpython-35.pyc
...
Successfully processed 38589 files; Failed processing 0 files
Now you can repeat STEP 2, and it should work!
We have a local pypiserver and up to now we are happy with it.
But psycopg2 makes trouble. It wants pg_config to be installed. I don't see a reason why it should be installed on the mirror server. I understand that it needs to be on the client where I install psycopg2.
Is this a bug in psycopg2? Or do I use the wrong options the get the package to the mirror?
pypi#gray:~> pip install --no-deps --no-install -d packages psycopg2
Downloading/unpacking psycopg2
File was already downloaded packages/psycopg2-2.5.1.tar.gz
Running setup.py egg_info for package psycopg2
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pypi/tmp/pip-build/psycopg2
Storing complete log in /home/pypi/.config/pip/pip.log
We use this pypiserver: https://pypi.python.org/pypi/pypiserver
I know this question is over a year old but the answer is pg_config is a linux-only module. You would need to install postgresql-devel to get it.