Zenika / POEI-Python-Rss

0 stars 0 forks source link

Error message during pip install #3

Open Riduidel opened 1 year ago

Riduidel commented 1 year ago

During pip install, I had the following error message

Collecting colorama
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Installing collected packages: sgmllib3k, MarkupSafe, itsdangerous, feedparser, colorama, Werkzeug, Jinja2, click, Flask
  DEPRECATION: sgmllib3k is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for sgmllib3k ... error
  error: subprocess-exited-with-error

  × Running setup.py install for sgmllib3k did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running install
      C:\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib
      copying sgmllib.py -> build\lib
      running install_lib
      byte-compiling C:\Python311\Lib\site-packages\sgmllib.py to sgmllib.cpython-311.pyc
      error: [Errno 13] Permission denied: 'C:\\Python311\\Lib\\site-packages\\__pycache__\\sgmllib.cpython-311.pyc.1506104212016'   
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> sgmllib3k
Bullfrog666 commented 1 year ago

It seems sgmllib was dropped in Python 3. For those depending on it, that’s somewhat unfortunate. Have you tried to use the project without it ?

Ultimately,I think requirement.txt file could be simplified with just: feedparser==6.0.10 Flask==2.2.3 Werkzeug==2.2.3

Riduidel commented 1 year ago

Install command line (to document in readme) should be pip install -r requirements.txt --use-pep517 --user

The --use-pep517 is required by sgmllib (a dependency of feedparser) and the --user is required by flask