question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip's cherrypy & "import cherrypy" => "ModuleNotFoundError: No module named 'jaraco.collections'"

See original GitHub issue

I’m submitting a …

  • bug report
  • feature request
  • question about the decisions made in the repository

Do you want to request a feature or report a bug?

A bug report

What is the current behavior?

On Ubuntu 18.04, after a

$ python3 -m pip install cherrypy

a

$ python3 -c "import cherrypy"

results in:

$ python3 my_mini_cherrypy.py
Traceback (most recent call last):
  File "my_mini_cherrypy.py", line 1, in <module>
    import cherrypy
  File "/home/sander/.local/lib/python3.6/site-packages/cherrypy/__init__.py", line 66, in <module>
    from ._cperror import (
  File "/home/sander/.local/lib/python3.6/site-packages/cherrypy/_cperror.py", line 135, in <module>
    from cherrypy.lib import httputil as _httputil
  File "/home/sander/.local/lib/python3.6/site-packages/cherrypy/lib/httputil.py", line 20, in <module>
    import jaraco.collections
ModuleNotFoundError: No module named 'jaraco.collections'

After pip uninstall, the import of (Ubuntu provided) cherrypy works:

$ python3 -c "import cherrypy; print(cherrypy.__version__)"
8.9.1

So a pip / pypi /packaing problem?

If the current behavior is a bug, please provide the steps to reproduce and if possible a screenshots and logs of the problem. If you can, show us your code.

See above.

What is the expected behavior?

the import should work

What is the motivation / use case for changing the behavior?

I can’t run anything cherrypy

Please tell us about your environment:

  • Cheroot version: cheroot-8.3.0
  • CherryPy version: cherrypy-18.6.0
  • Python version: 3.6.9
  • OS: Ubuntu 18.04
  • Browser: not involved

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, e.g. stackoverflow, gitter, etc.)

$ python3 -m pip install cherrypy
Collecting cherrypy
  Using cached https://files.pythonhosted.org/packages/a8/f9/e11f893dcabe6bc222a1442bf5e14f0322a2d363c92910ed41947078a35a/CherryPy-18.6.0-py2.py3-none-any.whl
Collecting jaraco.collections (from cherrypy)
  Using cached https://files.pythonhosted.org/packages/fe/06/a89652069f0a13a33701714c0c8e0cc8656bf6d21b7c6b85fde86cf06ff6/jaraco.collections-3.0.0-py2.py3-none-any.whl
Collecting portend>=2.1.1 (from cherrypy)
  Using cached https://files.pythonhosted.org/packages/d7/79/eee70a512bffe5ceb5008f8e3326581948f50ca393c3bcb4d557e4818bd1/portend-2.6-py2.py3-none-any.whl
Collecting more-itertools (from cherrypy)
  Using cached https://files.pythonhosted.org/packages/ef/9b/6c35ec5483710492e21252465160ee508170159f7e0e2d6cd769022f52f6/more_itertools-8.4.0-py3-none-any.whl
Collecting cheroot>=8.2.1 (from cherrypy)
  Using cached https://files.pythonhosted.org/packages/20/b0/4e156a205a624bc929673dfa6bcebe4aa6fa00b080dca4dc7b6b50850277/cheroot-8.3.0-py2.py3-none-any.whl
Collecting zc.lockfile (from cherrypy)
  Using cached https://files.pythonhosted.org/packages/6c/2a/268389776288f0f26c7272c70c36c96dcc0bdb88ab6216ea18e19df1fadd/zc.lockfile-2.0-py2.py3-none-any.whl
Collecting six>=1.7.0 (from jaraco.collections->cherrypy)
  Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting jaraco.classes (from jaraco.collections->cherrypy)
  Using cached https://files.pythonhosted.org/packages/68/ce/8f43aa0d0f18120e687ae0192fe3168630040841a3e87bed93c5fe024dbe/jaraco.classes-3.1.0-py2.py3-none-any.whl
Collecting jaraco.text (from jaraco.collections->cherrypy)
  Using cached https://files.pythonhosted.org/packages/50/cd/6eda44738065e844bed8fae60a229b6c46f42d0ba8d48205e9fb57e254cd/jaraco.text-3.2.0-py2.py3-none-any.whl
Collecting tempora>=1.8 (from portend>=2.1.1->cherrypy)
  Using cached https://files.pythonhosted.org/packages/df/da/b30f8af8b4aa63fed8d4979daf209494823a666235111e292c89256e91fb/tempora-3.0.0-py2.py3-none-any.whl
Collecting jaraco.functools (from cheroot>=8.2.1->cherrypy)
  Using cached https://files.pythonhosted.org/packages/4f/2b/bbab94f3e461adaf3c7a3a25da0c67c91d8cf7a4ddae7096028601ff940f/jaraco.functools-3.0.1-py3-none-any.whl
Collecting setuptools (from zc.lockfile->cherrypy)
  Using cached https://files.pythonhosted.org/packages/e9/93/4860cebd5ad3ff2664ad3c966490ccb46e3b88458b2095145bca11727ca4/setuptools-47.3.1-py3-none-any.whl
Collecting importlib-resources; python_version < "3.7" (from jaraco.text->jaraco.collections->cherrypy)
  Using cached https://files.pythonhosted.org/packages/ce/06/94cb4028cbcb834c3a6a0c239ab37e76e293c75bed51a9cee2cb8337b47e/importlib_resources-2.0.1-py2.py3-none-any.whl
Collecting pytz (from tempora>=1.8->portend>=2.1.1->cherrypy)
  Using cached https://files.pythonhosted.org/packages/4f/a4/879454d49688e2fad93e59d7d4efda580b783c745fd2ec2a3adf87b0808d/pytz-2020.1-py2.py3-none-any.whl
Collecting importlib-metadata; python_version < "3.8" (from importlib-resources; python_version < "3.7"->jaraco.text->jaraco.collections->cherrypy)
  Using cached https://files.pythonhosted.org/packages/8e/58/cdea07eb51fc2b906db0968a94700866fc46249bdc75cac23f9d13168929/importlib_metadata-1.7.0-py2.py3-none-any.whl
Collecting zipp>=0.4; python_version < "3.8" (from importlib-resources; python_version < "3.7"->jaraco.text->jaraco.collections->cherrypy)
  Using cached https://files.pythonhosted.org/packages/b2/34/bfcb43cc0ba81f527bc4f40ef41ba2ff4080e047acb0586b56b3d017ace4/zipp-3.1.0-py3-none-any.whl
Installing collected packages: six, more-itertools, jaraco.classes, jaraco.functools, zipp, importlib-metadata, importlib-resources, jaraco.text, jaraco.collections, pytz, tempora, portend, cheroot, setuptools, zc.lockfile, cherrypy
Successfully installed cheroot-8.3.0 cherrypy-18.6.0 importlib-metadata-1.7.0 importlib-resources-2.0.1 jaraco.classes-3.1.0 jaraco.collections-3.0.0 jaraco.functools-3.0.1 jaraco.text-3.2.0 more-itertools-8.4.0 portend-2.6 pytz-2020.1 setuptools-47.3.1 six-1.15.0 tempora-3.0.0 zc.lockfile-2.0 zipp-3.1.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sanderjocommented, Jul 3, 2020

I will close until I can pinpoint better.

Thanks

0reactions
liuqinfeicommented, Dec 10, 2021

I have figure out that there is some wrong with the jaraco-collections. After i rebuild the jaraco-collections rpm package. It works now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CherryPy installed to wrong Python directory : r/learnpython
Requirement already satisfied: jaraco.collections in /Library/Python/3.8/site-packages ... ModuleNotFoundError: No module named 'cherrypy'.
Read more >
python - ModuleNotFoundError: No module named 'cherrypy'
1. You probably have multiple versions of Python installed. Try python3.6 -m pip list and verify that cherrypi is in the list. If...
Read more >
Help moving to Mylar3 in Ubuntu - Mylar
... import jaraco.collections ModuleNotFoundError: No module named 'jaraco.collections'. I am at a loss, because I know that CherryPy and ...
Read more >
jaraco.collections - PyPI
Models and classes to supplement the stdlib 'collections' module. See the docs, linked above, for descriptions and usage examples. Highlights include:.
Read more >
sabnzbd - AUR (en)
sudo pip list | egrep jaraco jaraco.classes 3.2.1 jaraco.collections 3.5.1 jaraco.context 4.1.1 ... ModuleNotFoundError: No module named 'guessit'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found