numbas / editor

An editor for the Numbas e-learning system.
http://numbas.mathcentre.ac.uk
Apache License 2.0
59 stars 62 forks source link

first_setup.py: pkgtools is deprecated, help! #827

Open tigger04 opened 6 days ago

tigger04 commented 6 days ago

Hi there, I've been following the installation instructions diligently, but I seem to have run in to a roadblock on first_setup.py:

root@numbas:/srv/www/numbas_editor# source bin/activate
(numbas_editor) root@numbas:/srv/www/numbas_editor# python3 first_setup.py
/srv/www/numbas_editor/first_setup.py:11: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import packaging
Traceback (most recent call last):
  File "/srv/www/numbas_editor/first_setup.py", line 11, in <module>
    from pkg_resources import packaging
ImportError: cannot import name 'packaging' from 'pkg_resources' (/srv/www/numbas_editor/lib/python3.12/site-packages/pkg_resources/__init__.py)

Any advice greatly appreciated!

tigger04 commented 6 days ago

further troubleshooting ...

(numbas_editor) root@numbas:/srv/www/numbas_editor# pip install packaging
Requirement already satisfied: packaging in ./lib/python3.12/site-packages (24.1)
(numbas_editor) root@numbas:/srv/www/numbas_editor# python -c "import pkg_resources; print(pkg_resources.__file__)"
<string>:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
/srv/www/numbas_editor/lib/python3.12/site-packages/pkg_resources/__init__.py
tigger04 commented 6 days ago

Almost got there ... installing an older version of setuptools let's me run the installer first-run.py.

pip install setuptools==69.5.1

Everything was looking good, ready to launch the editor, but I get

Bad Request (400)

in the browser then.

And nothing in the logs at all :(

Any help, again, v much appreciated