1

To install jupyter in Linux I run the command:

   sudo pip3 install jupyter

But get this error:

Storing debug log for failure in /root/.pip/pip.log

If I write pip --version I get: pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4)

from /root/.pip/pip.log :

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2621, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2697, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ("Expected ',' or end-of-list in", 'pytest ==3.2.*', 'at', '*')

EDIT I am not using anaconda

Any idea how to fix it?

  • Did you try looking what does the debug log says!? – PoP Jan 20 '18 at 02:56
  • I don't know what is that, just copied the final line of the terminal, do you mean the previous lines @PoP ? –  Jan 20 '18 at 02:57
  • # cat /root/.pip/pip.log. – PoP Jan 20 '18 at 02:58
  • Also the fact that the log is getting stored under ~/root can be a hint that you do not have permissions. – PoP Jan 20 '18 at 02:58
  • But I have used sudo, I added the info @PoP –  Jan 20 '18 at 02:59
  • Looks like you have two versions of Python installed. 3.2 and 3.4. – PoP Jan 20 '18 at 03:03
  • For some unexplainable reason it worked. Now jupyter recognizes both versions. I suppose the question must be closed..@PoP –  Jan 20 '18 at 03:11
  • I don't have enough scores to delete it. You can go ahead and delete the question. – PoP Jan 20 '18 at 03:29
  • Can I delete being answered? Here is a related one, you may one to help this newbie: https://stackoverflow.com/questions/48352018/install-rpy2-returns-an-error @PoP –  Jan 20 '18 at 03:31

2 Answers2

1

you have an old version of pip installed I would update pip first using this command python -m pip install --upgrade pip (for windows ) you should have the newest version of pip which is pip 9.0.1 installed after updating pip. After this If you use anaconda right click on anaconda prompt(it can be found in search results on start menu by typing Anaconda Prompt). Rightclick this-> run as admin and after that type the following to install jupyter pip install jupyter . Avoid using "pip3" on anaconda prompt. If you don't use anaconda type pip3 install jupyter from command prompt

Ajinkya
  • 1,797
  • 3
  • 24
  • 54
  • 1
    This works, the upgrade command install it in /usr/local/bin, so then use /usr/local/bin/pip3.. – ondra Mar 08 '18 at 21:42
0

Try:

pip install jupyter --user

Without using sudo. This will store the packages in your home directory, under ~/.local/lib/python3.4/site-packages if you are using python3.4. Any missing dependencies will also be installed in that directory.

Oppy
  • 2,662
  • 16
  • 22