JosephLai241 / URS

Universal Reddit Scraper - A comprehensive Reddit scraping/archival command-line tool.
https://josephlai241.github.io/URS/
MIT License
809 stars 108 forks source link

ModuleNotFoundError: No module named 'distutils' | Installation error #73

Open Elwii04 opened 2 months ago

Elwii04 commented 2 months ago

DO NOT DELETE THIS TEMPLATE

Describe The Bug

When following the installation guide I get this error:

C:\Users\elias\Downloads\scraper filter\URS>poetry install Installing dependencies from lock file

Package operations: 40 installs, 0 updates, 0 removals

Note: This error originates from the build backend, and is likely not a problem with poetry but with numpy (1.24.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "numpy (==1.24.3)"'.

Expected Behavior

--

Actual Behavior

Error on installation

Steps To Reproduce

run: git clone --depth=1 https://github.com/JosephLai241/URS.git cd URS poetry install poetry shell maturin develop --release

When running "poetry shell" it seems to kind of work:

C:\Users\elias\Downloads\scraper filter\URS>poetry shell Spawning shell within C:\Users\elias\Downloads\scraper filter\URS.venv

(urs-py3.12) C:\Users\elias\Downloads\scraper filter\URS>

but when running "maturin develop --release" it does not find command "maturin"

Machine Specs

Additional Context

N/A

frutiemax92 commented 2 months ago

Same error on my side with numpy:

poetry install
Installing dependencies from lock file

Package operations: 40 installs, 0 updates, 0 removals

  - Installing numpy (1.24.3): Failed

  ChefBuildError

  Backend 'setuptools.build_meta:__legacy__' is not available.

  Cannot import 'setuptools.build_meta'

  at ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\poetry\installation\chef.py:164 in _prepare
      160│
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│
      163│             if error is not None:
    → 164│                 raise error from None
      165│
      166│             return path
      167│
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with numpy (1.24.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "numpy (==1.24.3)"'.

I had to reinstall Poetry, delete the lock file to make it work.

skerit commented 1 week ago

The documentation says that URS works on Python 3.11+, but that is a lie. At least: the committed poetry.lock file does not work with Python 3.12. So indeed: just delete that file and try again. That's what fixed it for me.