Installing fastai v1 on local machine


(Dinesh) #1

Hi All,
I have Anaconda installed on my Windows Laptop & I am trying to setup fastai libraries on it. After creating fastai environment and giving command “conda env update” I am getting following error.

Any idea whats wrong here ?

Exception:
Traceback (most recent call last):
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pkg_resources_init_.py”, line 2862, in _dep_map
return self._dep_map
File "C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2669, in getattr
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\packaging\requirements.py”, line 93, in init
req = REQUIREMENT.parseString(requirement_string)
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pyparsing.py”, line 1632, in parseString
raise exc
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pyparsing.py”, line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pyparsing.py”, line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pyparsing.py”, line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pyparsing.py”, line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pyparsing.py”, line 3183, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 33), (line:1, col:34)


(Willismar Medeiros) #2

Do you have another standalone python installed on your system or just anaconda ?

You can try to upgrade the pip package to all environments;
1 - in your (base) environment to never more this will happen when creating new environments

  • activate the base environment
  • update with : pip install -U pip , this will upgrade to version 18. instead of 10.

2 - and also update it on the fastai environment,

  • activate the fastai environment
  • update with : pip install -U pip

3 - try the command again

  • inside fastai environment : conda update env

(Dinesh) #3

Thanks for reply. I have upgraded pip to 18.1 but still same error.


(Willismar Medeiros) #4

Nice … lets see …
try update your setuptools in both environments fastai and base

conda update setuptools

and try it again


(Dinesh) #5

Tried it already which failed to update pip in fastai environment. Even I dropped fastai environment , created it again & then updated base & then tried to update fastai which failed again with same error. However I agree that it is something to do with pip.

I am getting this message when updating pip in fastai envronment

You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

xception:
raceback (most recent call last):
File “C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pkg_resources_init_.py”, line 2862, in _dep_map
return self._dep_map
File "C:\anaconda3\envs\fastai\lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2669, in getattr
raise AttributeError(attr)
ttributeError: _DistInfoDistribution__dep_map


(Willismar Medeiros) #6

Then … remove your entire fastai environment… try to update pip using conda on the base environment because the things that is available on the base will be used to create new environments.

And try it again. Man I emphasize this because If I create a new container or VM for the sake of do it will succeed. You may have a bad temporary package saved in your cached repository.


(Willismar Medeiros) #7

Try to update your git repository and start it again !