Conda env update error on Paperspace

I am pretty new to all of the echo system of jupyter so it great if you could post a link to the github page that the bug is in.
Or even better the commit itself that made it.
Thanks

Thanks for the help with this issue and the (hopefully) temporary fix. Appreciate the help so we
can continue our learning journey!!

Update: It seems like there is a problem with the current of nbconvert or its dependencies that
anaconda installs.
For some reason it breaks pip after you install it with conda install
I have found a work around and I just installed the package with pip.

see https://github.com/jupyter/notebook/pull/4036/commits/4c1d62f3b21af6f139d8396081578d0c1646a632

Cheers

I just tried to get started today with a brand new Paperspace instance. I did a git pull first, but conda env update continues to give similar errors to what others have seen:

Exception:
Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2862, in _dep_map
return self.__dep_map
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/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 “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py”, line 93, in init
req = REQUIREMENT.parseString(requirement_string)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pyparsing.py”, line 1632, in parseString
raise exc
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pyparsing.py”, line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pyparsing.py”, line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pyparsing.py”, line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pyparsing.py”, line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2942, in init
super(Requirement, self).init(requirement_string)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py”, line 97, in init
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at “’; extra '”

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_internal/basecommand.py”, line 228, in main
status = self.run(options, args)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_internal/commands/install.py”, line 291, in run
resolver.resolve(requirement_set)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_internal/resolve.py”, line 103, in resolve
self._resolve_one(requirement_set, req)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_internal/resolve.py”, line 307, in _resolve_one
set(req_to_install.extras) - set(dist.extras)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2819, in extras
return [dep for dep in self._dep_map if dep]
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2864, in _dep_map
self.__dep_map = self._compute_dependencies()
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2874, in _compute_dependencies
reqs.extend(parse_requirements(req))
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2935, in parse_requirements
yield Requirement(line)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/pip/_vendor/pkg_resources/init.py”, line 2944, in init
raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Invalid requirement, parse error at “’; extra '”

The jupyter lines are commented out in environment.yml.

Any suggestions for how to get this running?

facing the same issue now. The lines in enviroment.yml are commented out but condo env update still fails.

hey,
I noticed the environment.yml has all Jupiter related line commented, but still with conda env update I get the same issue. Any solution for this?

I uncommented jupyter deps and only commented pip installs and installed them manually from conda, it worked. But none of the other solutions I read so far seemed to work for me. Ubuntu 18.04 on AWS.

Edit: Still I got some issues with the above approach. So I ended up launching a Ubuntu 16.04 instance and downgrading ‘testpath’ regarding https://github.com/conda-forge/testpath-feedstock/issues/7. Now conda env update works without any disturbance and additional need of commenting out. You may change it to testpath<0.4.

1 Like

The problem I have after update is the following :
It seems that I can Update butI have activation problem and for now I have no fastai on my Notebook on Paperspace.

I get the error:

to activate this envirounment use:
source activate fastai

and when I tray to run this command I get the following error:

source: not found

after some searches I tried :

conda activate fastai

I also get error:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with

$ echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc

or, for all users, enable conda with

$ sudo ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH. To do so, run

$ conda activate

in your terminal, or to put the base environment on PATH permanently, run

$ echo "conda activate" >> ~/.bashrc

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file. You should manually remove the line that looks like

export PATH="/opt/conda/bin:$PATH"

after trying all the above mentioned command I still cget the same error as above after running the command.

I also tried:

activate conda

and it also give me the error:

/bin/sh: 8: activate: Permission denied

P.S. I use Paperspace
any help is appreciated

Hey, just to double check that you have the fastai environment listed by typing in “conda info --envs” . Also what happens if you type in “type -a source”?

Apparently the latest testpath is fixed, so I’ve just modified environment.yml to require it. Let me know if that fixes the issue.

1 Like

Hi Jeremy. I get the following error now:

# conda env update
Solving environment: failed

ResolvePackageNotFound:
- testpath[version='>=0.4.2']

here are the results:

$ conda info --envs

$ conda environments:

base * /opt/conda
fastai /opt/conda/envs/fastai

#############

$ type -a source
-a: not found
source: not found

both of them run from root directory where environment.yml is located

(fastai) paperspace@ps4rjr1oa:~/fastai$ git pull
(fastai) paperspace@ps4rjr1oa:~/fastai$ conda env update

Passes cleanly now
Note: the update was not critical, you could still follow Lesson 1

Update works, BUT at the end I can not activate fastai. and therefore import fastai fails in notebook
That is my problem I am facing.

Yes tried in a new instance again, following github readme steps work.

conda env update does not work in the fastai directory but in root directory

I still have the problem to update . I created a fresh new instance of fastai in Paperspace and after update I have to activate fastai and I can not do It. I posted the error above

@jeremy nothing new ? I still can not activate fastai env. I really need the latest update.

At-mentioning me and asking repeatedly for support is a good way to ensure that you don’t get assistance. It’s really not a thoughtful thing to do, and means I’m spending time writing this rather than improving the software and writing the next course.

1 Like

So going through this email chain it was suggested these packages jupyter_contrib_nbextensions , nbconvert need to be commented out. However someone mentioned their dependencies need to be taken out. So my question is

What other packages & dependencies we need to comment out in environment.yml ?