moinwiki / moin

MoinMoin Wiki Development (2.0+), unstable, for production please use 1.9.x.
https://moinmo.in/
Other
311 stars 91 forks source link

Traceback ModuleNotFoundError: No module named 'pkg_resources' #1700

Open UlrichB22 opened 5 months ago

UlrichB22 commented 5 months ago

On a newly installed system (Ubuntu 24.04 with Python 3.12.3) I get following traceback:

(moin-venv-python3) $ moin --help
Traceback (most recent call last):
  File "<path>/moin-venv-python3/bin/moin", line 5, in <module>
    from moin.cli import cli
  File "<path>/moin/src/moin/cli/__init__.py", line 15, in <module>
    from moin.app import create_app
  File "<path>/moin/src/moin/app.py", line 32, in <module>
    from moin import auth, user, config
  File "<path>/moin/src/moin/auth/__init__.py", line 146, in <module>
    from moin import user
  File "<path>/moin/src/moin/user.py", line 62, in <module>
    from moin.utils.crypto import generate_token, valid_token, make_uuid
  File "<path>/moin/src/moin/utils/crypto.py", line 21, in <module>
    from passlib.pwd import genword
  File "<path>/moin-venv-python3/lib/python3.12/site-packages/passlib/pwd.py", line 16, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

An issue has already been created for passlib, see https://foss.heptapod.net/python-libs/passlib/-/issues/185 .

As a workaround, setuptools can be installed, which has been removed for regular users in #1670.

RogerHaase commented 3 months ago

Ran into same issue installing moin 2.0.0b1 from pypi with python 3.12.4.

(PYPI-b1) C:\PYPI-b1>moin --help
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\PYPI-b1\Scripts\moin.exe\__main__.py", line 4, in <module>
  File "C:\PYPI-b1\Lib\site-packages\moin\cli\__init__.py", line 15, in <module>
    from moin.app import create_app
  File "C:\PYPI-b1\Lib\site-packages\moin\app.py", line 32, in <module>
    from moin import auth, user, config
  File "C:\PYPI-b1\Lib\site-packages\moin\auth\__init__.py", line 146, in <module>
    from moin import user
  File "C:\PYPI-b1\Lib\site-packages\moin\user.py", line 62, in <module>
    from moin.utils.crypto import generate_token, valid_token, make_uuid
  File "C:\PYPI-b1\Lib\site-packages\moin\utils\crypto.py", line 21, in <module>
    from passlib.pwd import genword
  File "C:\PYPI-b1\Lib\site-packages\passlib\pwd.py", line 16, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Workaround:

pip install setuptools