webrecorder / pywb

Core Python Web Archiving Toolkit for replay and recording of web archives
https://pypi.python.org/pypi/pywb
GNU General Public License v3.0
1.34k stars 207 forks source link

Does not install under Python 3.7 #853

Closed anjackson closed 1 year ago

anjackson commented 1 year ago

Describe the bug

Using a fresh v3.7 virtualenv, installation and running failed because we are not compatible with recent versions of Werkzeug. To build right now, I have to use:

pip install "Werkzeug<2.2.0"

If not, there is an error that breaks the installation process:

pywb 2.8.0.dev0 requires markupsafe<2.1.0, but you have markupsafe 2.1.3 which is incompatible.

Steps to reproduce the bug

``` virtualenv -p python3.7 .venv source .venv/bin/activate python setup.py install ``` ## Expected behavior

Install runs, logs get to the point of saying...

Finished processing dependencies for pywb==2.8.0.dev0

Environment

RHEL 7.x

Additional context

I'm happy for myself and @ldbiz to look at fixing this, but I'd like to know how you want to pursue this (given also #385):

edsu commented 1 year ago

I don't know if it's helpful but I got pretty far along upgrading various dependencies in #839.

anjackson commented 1 year ago

Thanks, that's helpful.

But, it's weird, because now a very slight different install method seems to work much better.

pip install .

goes

...
INFO: pip is looking at multiple versions of werkzeug to determine which version is compatible with other requirements. This could take a while.
Collecting werkzeug (from pywb->ukwa-pywb==2.6.9)
  Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
  Using cached Werkzeug-2.2.1-py3-none-any.whl (232 kB)
  Using cached Werkzeug-2.2.0-py3-none-any.whl (232 kB)
  Using cached Werkzeug-2.1.2-py3-none-any.whl (224 kB)
...

And so works fine.

ldbiz commented 1 year ago

Invoking setup.py directly is apparently deprecated. Some context and "python setup.py..." etc alternatives here from one of the core python developers, relevant peps referenced within:

https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

anjackson commented 1 year ago

Aside: I found this somewhat useful https://stackoverflow.com/questions/15724093/difference-between-python-setup-py-install-and-pip-install/15731459#15731459