Gonçalo Pais
Gonçalo Pais

Reputation: 31

TyperError installing jupyter

I'm trying to install jupyter on Ubuntu 14.04 LTS but I keep getting this error. I tried giving permissions to every folder and run the code as:

sudo -H pip3 install --user jupyter

But nothing worked. I also did the update on pip and it's running the latest version.

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.4/dist-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/usr/local/lib/python3.4/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_install.py", line 412, in run_egg_info
    self.setup_py, self.name,
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_install.py", line 387, in setup_py
    import setuptools  # noqa
  File "/root/.local/lib/python3.4/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/root/.local/lib/python3.4/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/root/.local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/root/.local/lib/python3.4/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() missing 1 required positional argument: 'name'

Thanks for the help!

Upvotes: 2

Views: 626

Answers (2)

For me it works with the recent pyparsing package. Perhaps you need to upgrade your pyparsing to the recent version. If you installed it with apt-get, you need to remove the python3-pyparsing package, and install it with pip3.

sudo apt remove python3-pyparsing
sudo pip3 install pyparsing

As this answer writes, you need pyparsing>=2.0.2 to avoid this error.

Upvotes: 3

MrCelticFox
MrCelticFox

Reputation: 51

I had this error as well, after a bit of digging I found this question that addresses the same error caused by some other software.

As the author states, the problem is that the call to MARKER_EXPR() should have a 'name' argument but it doesn't.

To fix this, edit line 59 of /usr/local/lib/python3.4/dist-packages/packaging/requirements.py and just add quotes to the call to MARKER_EXPR() like so:

MARKER_EXPR = originalTextFor(MARKER_EXPR(""))("marker")

Upvotes: 1

Related Questions