Comments (13)
Clearly nvcc compiler is not the path, then I tried PATH = PATH + ":/usr/local/cuda-7.5/bin", it still doesn't work
This doesn't change where nvcc
is searched for, that PATH
is just a backup of the environment variable to avoid Anaconda sneaking in a wrong MSVC version on Windows. You'd need to modify os.environ['PATH']
, or just change your PATH
environment variable. Did you restart your terminal after changing the .bashrc
? You can try echo $PATH
to see if the path is correct.
Note that when you're using sudo
, the PATH
will be overridden, no matter what you set it to. You can do sudo PATH="$PATH" ...
to have the environment carry over.
from cudamat.
Per the installation instructions were you trying to install system-wide via sudo
or just under your user directory?
Can you also supply the permissions of nvcc
as well? The output of either sudo ls -l $(which nvcc)
or ls -l $(which nvcc)
depending on the type of install you're attempting should do the trick.
from cudamat.
I tried both!
$ sudo ls -l $(which nvcc)
-rwxr-xr-x 1 root root 209624 Nov 26 09:56 /usr/local/cuda-6.5/bin/nvcc
from cudamat.
Interesting. For me it installs fine under Ubuntu 14.04 and CUDA 6.5. Why does your shell find nvcc
and setuptools doesn't? Did you add /usr/local/cuda/bin
(or /usr/local/cuda-6.5/bin
) to your PATH
environment variable? Can you add a print 'PATH =', os.environ.get('PATH')
line to the top of the setup.py
file to check (after the imports)?
from cudamat.
Yes, cuda is in PATH. Plus otherwise it would not compile when I call make on your previous commit.
from cudamat.
Still:
Can you add a
print 'PATH =', os.environ.get('PATH')
line to the top of thesetup.py
file to check (after the imports)?
There must be something different. Unless we're misinterpreting the error message and it finds nvcc
, but nvcc
is missing something.
from cudamat.
One other thing that would help us try and track down the source of the error would be to add '--verbose'
to the nvcc_compile_args
list in setup.py
. Then try to install again, and paste the full output of that command.
from cudamat.
I did not see you meant in the setup.py. I just did it, cuda is not inside.
This is because I modified the PATH environment variable inside my user's .bashrc file. The CUDA post installation notes tell you to add the environment variables manually here.
It works fine now!
from cudamat.
When I add the print 'PATH =', os.environ.get('PATH')
line to the setup.py, it shows /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
.Clearly nvcc compiler is not the path, then I tried PATH = PATH + ":/usr/local/cuda-7.5/bin"
, it still doesn't work and still shows unable to execute 'nvcc': No such file or directory
, what should I do? I've already add the nvcc path to the .bashrc file.
from cudamat.
from cudamat.
Try not run python in the directory "cudamat".
This is some lines in INSTALL.md
cd test # so it doesn't try importing cudamat from the source directory
# Run tests
nosetests
# Run benchmark
python ../examples/bench_cudamat.py
from cudamat.
@flavianh I don't know how you got it to work, even with nvcc in my sudo and user path, it wouldn't work. I had to change the lines:
class CUDA_build_ext(build_ext):
"""
Custom build_ext command that compiles CUDA files.
Note that all extension source files will be processed with this compiler.
"""
def build_extensions(self):
self.compiler.src_extensions.append('.cu')
self.compiler.set_executable('compiler_so', 'nvcc')
self.compiler.set_executable('linker_so', 'nvcc --shared')
if hasattr(self.compiler, '_c_extensions'):
self.compiler._c_extensions.append('.cu') # needed for Windows
self.compiler.spawn = self.spawn
build_ext.build_extensions(self)
to
class CUDA_build_ext(build_ext):
"""
Custom build_ext command that compiles CUDA files.
Note that all extension source files will be processed with this compiler.
"""
def build_extensions(self):
self.compiler.src_extensions.append('.cu')
self.compiler.set_executable('compiler_so', '/usr/local/cuda/bin/nvcc')
self.compiler.set_executable('linker_so', '/usr/local/cuda/bin/nvcc --shared')
if hasattr(self.compiler, '_c_extensions'):
self.compiler._c_extensions.append('.cu') # needed for Windows
self.compiler.spawn = self.spawn
build_ext.build_extensions(self)
Note that I had to provide the full path to nvcc for it to work.
from cudamat.
@nateGeorge: What about pip install http://github.com/f0k/cudamat/archive/simplify-compile.zip
, does this fail as well? It's a little different, but not sure if this would help. Did you try installing with sudo
or without?
from cudamat.
Related Issues (20)
- install problem in windows (python in anaconda) HOT 10
- failed to import cudamat
- import error : could not find module libcudamat.dll
- problem while installing cudamat
- Windows import/compile issue
- EE ===ERROR: Failure: OSError (/home/facecnn/cudamat-master/test/libcudamat.so: cannot open shared object file: No such file or directory) HOT 4
- how to do subtract_row_vec or subtract_col_vec in cudamat HOT 3
- Install Error on Windows HOT 2
- cudamat cannot initialize HOT 11
- install error on Windows HOT 22
- I have an error in importing cudamat. HOT 3
- Compile error: undefined reference to `jsonp_dtostr'
- install error on windows 10 HOT 3
- install error on windows 10 HOT 6
- error initializing CUBLAS: (err=1) HOT 2
- fp16 HOT 1
- cudamat.cudamat.CUDAMatException: error initializing CUBLAS: (err=1) HOT 3
- test errors HOT 5
- [Solved] Linux install fails: "unable to execute 'nvcc': No such file or directory" HOT 2
- clang: error: cannot find libdevice for sm_61 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cudamat.