Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setp up error #18

Open
YaolinHou opened this issue May 3, 2019 · 6 comments
Open

setp up error #18

YaolinHou opened this issue May 3, 2019 · 6 comments

Comments

@YaolinHou
Copy link

`Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/yaolin/Documents/dirt
Requirement already satisfied: tensorflow-gpu>=1.4 in /usr/local/lib/python2.7/dist-packages (from dirt==0.2.0) (1.10.0)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from dirt==0.2.0) (1.14.5)
Requirement already satisfied: setuptools<=39.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (39.1.0)
Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: enum34>=1.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.6)
Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.2.2)
Requirement already satisfied: tensorboard<1.11.0,>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.10.0)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.12.0)
Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.29.0)
Requirement already satisfied: absl-py>=0.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: backports.weakref>=1.0rc1 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.post1)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.20.1)
Requirement already satisfied: protobuf>=3.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.7.1)
Requirement already satisfied: mock>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.0.3)
Requirement already satisfied: werkzeug>=0.11.10 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (0.15.2)
Requirement already satisfied: futures>=3.1.1; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.2.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.1)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock>=2.0.0->tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.2)
Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/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 /tmp/pip-wheel-J03Czp --python-tag cp27:
ERROR: running bdist_wheel
running build
-- The CXX compiler identification is GNU 5.4.0
-- The CUDA compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CUDA_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-TFkMzh/setup.py", line 46, in
'Programming Language :: Python :: 2.7',
File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-TFkMzh/setup.py", line 24, in run
build_csrc()
File "/tmp/pip-req-build-TFkMzh/setup.py", line 18, in build_csrc
subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-TFkMzh/csrc']' returned non-zero exit status 1

ERROR: Failed building wheel for dirt
Running setup.py clean for dirt
Failed to build dirt
Installing collected packages: dirt
Running setup.py install for dirt ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-uLdiH5/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
-- The CUDA compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CUDA_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 46, in <module>
    'Programming Language :: Python :: 2.7',
  File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
    self.run_command('build')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 24, in run
    build_csrc()
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 18, in build_csrc
    subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-TFkMzh/csrc']' returned non-zero exit status 1
----------------------------------------

ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-uLdiH5/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-TFkMzh/
`

@pmh47
Copy link
Owner

pmh47 commented May 3, 2019

It looks like your cuda compiler (nvcc, part of cuda toolkit) is missing, or installed in a non-standard location that cmake cannot find. As the message says, set CUDACXX environment variable to point to the nvcc binary, e.g. /usr/local/cuda/bin/nvcc

@YaolinHou
Copy link
Author

I tried to run tests (python tests/square_test.py) with tf-1.12 and obtained following error

python tests/square_test.py
Traceback (most recent call last):
File "tests/square_test.py", line 54, in
main()
File "tests/square_test.py", line 45, in main
dirt_pixels = get_dirt_pixels().eval()
File "tests/square_test.py", line 36, in get_dirt_pixels
)[:, :, 0]
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 525, in _slice_helper
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 691, in strided_slice
shrink_axis_mask=shrink_axis_mask)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 8522, in strided_slice
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3274, in create_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1792, in init
control_input_ops)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1631, in _create_c_op
raise ValueError(str(e))
ValueError: slice index 0 of dimension 2 out of bounds. for 'strided_slice' (op: 'StridedSlice') with input shapes: [0,8,0], [3], [3], [3] and with computed input tensors: input[1] = <0 0 0>, input[2] = <0 0 1>, input[3] = <1 1 1>.

@eshafeeqe
Copy link

I came across the same issue, any suggestions to try ?

@pmh47
Copy link
Owner

pmh47 commented May 14, 2019

I have not been able to reproduce this. To get some more info, add between line 49 & 50 of dirt/rasterise_ops.py the following:

print(_rasterise_module.rasterise(
            background[np.newaxis, ...], vertices[np.newaxis, ...], vertex_colors[np.newaxis, ...], faces[np.newaxis, ...],  # inputs
            height, width, channels,  # attributes
            name='something-unique'
        ).shape)

and let me know what it prints.

@eshafeeqe
Copy link

Hello @pmh47,

Thanks for the reply, just added path to nvcc as CMAKE_CUDA_COMPILER_FILENAME in CMakeCache and this resolved the issue.

Even my nvcc path is defaut path /usr/local/cuda/bin/nvcc still CMake failed to find it.

Maybe some small fix could resolve this.

Thanks and Regards,
Shafeeq E

@xiaobaozi1996
Copy link

@YaolinHou The same problem as you, how did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants