question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error during test_spatial_narrow_as_op.py while installing

See original GitHub issue

System information

  • Operating system: Ubuntu 16.04.3 LTS
  • Compiler version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)
  • CUDA version: CUDA 8.0
  • cuDNN version: cuDNN 6.0
  • NVIDIA driver version: nvidia-387
  • GPU models (for all devices if they are not all the same): Titan X
  • PYTHONPATH environment variable: /usr/local/lib/python2.7
  • python --version output: Python 2.7.12

Hi,

I’ve been trying to install detectron in my machine. After following all steps required in install.md I check te installation by running python2 $DETECTRON/tests/test_spatial_narrow_as_op.py. And I get the following error:

ERROR: test_large_forward (main.SpatialNarrowAsOpTest)

Traceback (most recent call last): File “test_spatial_narrow_as_op.py”, line 68, in test_large_forward self._run_test(A, B) File “test_spatial_narrow_as_op.py”, line 37, in _run_test workspace.FeedBlob(‘A’, A) File “/usr/local/caffe2/python/workspace.py”, line 322, in FeedBlob return C.feed_blob(name, arr, StringifyProto(device_option)) RuntimeError: [enforce fail at common_cudnn.h:118] version_match. cuDNN compiled (7005) and runtime (7003) versions mismatch

Could anyone help me to figure out what is wrong with the installation?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ambigus9commented, Apr 3, 2018

Hi, I install Caffe2 from Anaconda Pre-build Binaries with CUDA 8.0 and cuDNN 7.1.2 and got this error:

RuntimeError: [enforce fail at common_cudnn.h:118] version_match. cuDNN compiled (7101) and runtime (7102) versions mismatch

How can I “uninstall” or use the same version? I tried

sudo dpkg -i libcudnn7_7.1.1.5-1+cuda8.0_amd64.deb sudo dpkg -i libcudnn7-dev_7.1.1.5-1+cuda8.0_amd64.deb

and also,

tar -xzvf cudnn-8.0-linux-x64-v7.1.tgz

sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

But doesn’t work

3reactions
lupottocommented, Apr 21, 2018

Hi guys,

As @ambigus9 said I solved the problem using Docker. I tried everything and I didn’t find out any other solution with the mismatch of versions.

I explain the steps that I followed if someone is not familiar with docker

1. Install docker. (https://docs.docker.com/install/) 2. Install nvidia-docker (https://github.com/NVIDIA/nvidia-docker) 3. Follow the steps of (https://github.com/facebookresearch/Detectron/blob/master/INSTALL.md) 3.1 Clone repo 3.2 Install docker image & run the test image 4. After that, start the container associated with the image: sudo nvidia-docker container run --rm -it detectron:c2-cuda9-cudnn7 bash 5. Now, inside the container you can run the demo: python2 tools/infer_simple.py
–cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml
–output-dir /tmp/detectron-visualizations
–image-ext jpg
–wts https://s3-us-west-2.amazonaws.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl
demo

I hope you find it helpful

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix error during pythonnet installation - Stack Overflow
So, the command line should be: python -m pip install --pre pythonnet . Or specify the version directly: pip install pythonnet==3.0.0rc6 . On...
Read more >
Using Python's pip to Manage Your Projects' Dependencies
In this example, you run pip with the install command followed by the name of the package that you want to install. The...
Read more >
prompt keeps popping up asking me… - Apple Developer
Python is installed (Python 3.10.5), I have previously installed Xcode command line developer tools, so I'm not sure why I'm stuck in this...
Read more >
How to Fix Python `No such file or directory` Compiler Errors ...
A common error that you may receive when installing Python modules is the No such file or directory error. This error results from...
Read more >
Install Python, pip, and the EB CLI on Windows
From the Start menu, open a Command Prompt window. Verify that Python and pip are both installed correctly by using the following commands....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found