pyTorch not working with an old NVidia card

Yes I did, follow the steps in my first reply if you are facing the same problem.

i am getting stuck in the last 6th step.It shows is not found ,however it is there.(i am using windows 10)
Will installing cpu version of pytorch atleast run the code without errors?

Are you using bash inside windows? Could you ls the directory you are standing on and paste the output, also could you paste the error message you are getting ?

$ python install
bash: python: command not found
(when using git bash)

running install
running build_deps
error: [WinError 2] The system cannot find the file specified
(when using anaconda prompt)

1 Like


I have the same problem with step 6. Maybe you could help solve this issue?

When I try to run the I receive an error:
python install
running install
running build_deps
error: [WinError 2] The system cannot find the file specified

I have navigated to the correct folder “~\Fast_AI\Github material\fastai\pytorch”, when I list the files I can see, but it does not allow to run.

Files in pytorch folder:
2018-04-25 11:53 AM .
2018-04-25 11:53 AM …
2018-04-25 11:42 AM 10 .dockerignore
2018-04-25 11:53 AM 972 .gitignore
2018-04-25 11:53 AM 312 .gitmodules
2018-04-25 11:53 AM 1,202 .travis.yml
2018-04-25 11:53 AM cmake
2018-04-25 11:53 AM 6,775
2018-04-25 11:53 AM 1,600 Dockerfile
2018-04-25 11:53 AM docs
2018-04-25 11:53 AM 2,249 LICENSE
2018-04-25 11:53 AM 12,158
2018-04-25 11:53 AM 8 requirements.txt
2018-04-25 11:53 AM 24,736
2018-04-25 11:53 AM test
2018-04-25 11:53 AM third_party
2018-04-25 12:08 PM tools
2018-04-25 11:53 AM torch
2018-04-25 11:53 AM 169 tox.ini
11 File(s) 50,191 bytes
8 Dir(s) 64,394,248,192 bytes free

I have downloaded pytorch not from local source, but .tar.bz2 and installed via conda with conda install path to file/file name

Pytorch installations for windows:

Got help from Joschka: Unable install Pytorch from source for older GPU card

For anyone still facing the old card issue, the latest pytorch added support for old cards as many people were facing the same issue.

I have installed pytorch 0.4 in fastai library using normal pip install, and it’s been running fine without any issues on my 940MX with GPU capability 5.0. I have nvidia 390 proprietary drivers installed on ubuntu 18.04 with CUDA 9.0 and CUDNN 7.0.


I’m trying to get my GTX 760 to run on Fedora 28. I tried to find the corresponding installs for the Ubuntu fixes listed above, but no luck so far.

Anyone have any suggestions?

ubuntu or windows? I have the Same GPU configuration with you.

If i understand correctly, CUDNN is not required and isn’t supported in, correct although it’ll make things even faster?


CUDNN is a library of primitives which are used in CUDA if they’re present. It’s at a lower level than pytorch - on which fastai is written over. And it’s not required to have, but having them makes many computations run faster. And as you might have guessed by now, fastai runs with or without them.

Ive done exactly these steps. I can successfully build it but i still get the message,

Found GPU0 GeForce GTX 680 which is of cuda capability 3.0.
PyTorch no longer supports this GPU because it is too old.

warnings.warn(old_gpu_warn % (d, name, major, capability[1]))
Traceback (most recent call last):
File “”, line 154, in
File “”, line 135, in main
File “/home/server/miniconda2/envs/env123/lib/python3.5/site-packages/torch/nn/modules/”, line 522, in load_state_dict
KeyError: ‘unexpected key “rnn_0.weight_ih_l0” in state_dict’

what can i do else ?

1 Like

After a long search i found the solution
The problem is that if the GPU is old the pytorch version before 0.4.0 doesn’t work, so you have to install the newest pytorch,
run this - conda install -c pytorch pytorch
After you install the newest pytorch you will face torch._C import * DLL load failed problem
to fix that run the ff code

conda install -c pytorch pytorch

Hello. I had faced done the setup locally until I faced the same issue because I have NVidia GeForce 830M. I followed these steps to install pytorch from source. In the last step when I ran python install, it gave me an error.
Gcc runtime error 1. It said ‘CuDNN v5 found, but need at least CuDNN v6’. I am new to setting up. I will be grateful if anyone could help me through this.

The problem is that in my fastai environment there is a conda package of cudnn v7.2.1 which is confusing me.

Followed the steps. Why am i getting ‘CuDNN version not supported’ error after last step?

I have installed pytorch 0.4, the old gpu problem has gone but a new error came out:

UnicodeDecodeError Traceback (most recent call last)
in ()
----> 1 learn = ConvLearner.pretrained(arch, data, precompute=True)

~/fastai/courses/dl1/fastai/ in pretrained(cls, f, data, ps, xtra_fc, xtra_cut, custom_head, precompute, pretrained, **kwargs)
112 models = ConvnetBuilder(f, data.c, data.is_multi, data.is_reg,
113 ps=ps, xtra_fc=xtra_fc, xtra_cut=xtra_cut, custom_head=custom_head, pretrained=pretrained)
–> 114 return cls(data, models, precompute, **kwargs)
116 @classmethod

~/fastai/courses/dl1/fastai/ in init(self, data, models, precompute, **kwargs)
98 if hasattr(data, ‘is_multi’) and not data.is_reg and self.metrics is None:
99 self.metrics = [accuracy_thresh(0.5)] if else [accuracy]
–> 100 if precompute: self.save_fc1()
101 self.freeze()
102 self.precompute = precompute

~/fastai/courses/dl1/fastai/ in save_fc1(self)
177 m=self.models.top_model
178 if len(self.activations[0])!=len(
–> 179 predict_to_bcolz(m,, act)
180 if len(self.activations[1])!=len(
181 predict_to_bcolz(m,, val_act)

~/fastai/courses/dl1/fastai/ in predict_to_bcolz(m, gen, arr, workers)
15 lock=threading.Lock()
16 m.eval()
—> 17 for x,*_ in tqdm(gen):
18 y = to_np(m(VV(x)).data)
19 with lock:

~/anaconda3/envs/fastai/lib/python3.6/site-packages/tqdm/ in iter(self)
935 “”", fp_write=getattr(self.fp, ‘write’, sys.stderr.write))
–> 937 for obj in iterable:
938 yield obj
939 # Update and possibly print the progressbar.

~/fastai/courses/dl1/fastai/ in iter(self)
86 # avoid py3.6 issue where queue is infinite and can result in memory exhaustion
87 for c in chunk_iter(iter(self.batch_sampler), self.num_workers*10):
—> 88 for batch in, c):
89 yield get_tensor(batch, self.pin_memory, self.half)

~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/ in result_iterator()
584 # Careful not to keep a reference to the popped future
585 if timeout is None:
–> 586 yield fs.pop().result()
587 else:
588 yield fs.pop().result(end_time - time.time())

~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/ in result(self, timeout)
423 raise CancelledError()
424 elif self._state == FINISHED:
–> 425 return self.__get_result()
427 self._condition.wait(timeout)

~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/ in __get_result(self)
382 def __get_result(self):
383 if self._exception:
–> 384 raise self._exception
385 else:
386 return self._result

~/anaconda3/envs/fastai/lib/python3.6/concurrent/futures/ in run(self)
55 try:
—> 56 result = self.fn(*self.args, **self.kwargs)
57 except BaseException as exc:
58 self.future.set_exception(exc)

~/fastai/courses/dl1/fastai/ in get_batch(self, indices)
74 def get_batch(self, indices):
—> 75 res = self.np_collate([self.dataset[i] for i in indices])
76 if self.transpose: res[0] = res[0].T
77 if self.transpose_y: res[1] = res[1].T

~/fastai/courses/dl1/fastai/ in (.0)
74 def get_batch(self, indices):
—> 75 res = self.np_collate([self.dataset[i] for i in indices])
76 if self.transpose: res[0] = res[0].T
77 if self.transpose_y: res[1] = res[1].T

~/fastai/courses/dl1/fastai/ in getitem(self, idx)
201 xs,ys = zip(*[self.get1item(i) for i in range(*idx.indices(self.n))])
202 return np.stack(xs),ys
–> 203 return self.get1item(idx)
205 def len(self): return self.n

~/fastai/courses/dl1/fastai/ in get1item(self, idx)
195 def get1item(self, idx):
–> 196 x,y = self.get_x(idx),self.get_y(idx)
197 return self.get(self.transform, x, y)

~/fastai/courses/dl1/fastai/ in get_x(self, i)
297 super().init(transform)
298 def get_sz(self): return
–> 299 def get_x(self, i): return open_image(os.path.join(self.path, self.fnames[i]))
300 def get_n(self): return len(self.fnames)

~/fastai/courses/dl1/fastai/ in open_image(fn)
266 elif os.path.isdir(fn) and not str(fn).startswith(“http”):
267 raise OSError(‘Is a directory: {}’.format(fn))
–> 268 elif isdicom(fn):
269 slice = pydicom.read_file(fn)
270 if slice.PhotometricInterpretation.startswith(‘MONOCHROME’):

~/fastai/courses/dl1/fastai/ in isdicom(fn)
250 with open(fn) as fh:
–> 252 return‘DICM’
254 def open_image(fn):

~/anaconda3/envs/fastai/lib/python3.6/ in decode(self, input, final)
319 # decode input (taking the buffer into account)
320 data = self.buffer + input
–> 321 (result, consumed) = self._buffer_decode(data, self.errors, final)
322 # keep undecoded input until the next call
323 self.buffer = data[consumed:]

UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 30: invalid start byte

I have also tried pytorch 0.3 and it gives the same UnicodeDecodeError…
Have you seen this error in the process or do you have any suggestions? Thank you.

I got the same error and could not work on the course. Help needed!

OK, managed to fix it!
do a git pull. they’ve seem to have fixed the files.
Now I get the warning but at last I can run stuff.
(It’s horribly slow though)

Yes, works now. Thank you for reminding!