webis-de / archive-query-log

📜 The Archive Query Log.
https://tira.io/task/archive-query-log
MIT License
22 stars 0 forks source link

No module named web_archive_query_log #22

Closed jcchouinard closed 8 months ago

jcchouinard commented 8 months ago

I can't seem to make it work. When running pip3 install -e .

I get this output

.....
  Building wheel for pycld3 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pycld3 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [55 lines of output]
      /private/var/folders/3n/qj60zh2j4wjfj50_z5q4lg4r0000gp/T/pip-build-env-44hybrdi/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
.....
          cmd_obj.run()
        File "<string>", line 109, in run
      RuntimeError: The Protobuf compiler, `protoc`, which is required for building this package, could not be found.
      See https://github.com/protocolbuffers/protobuf for information on installing Protobuf.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycld3
Successfully built archive-query-log fasttext
Failed to build pycld3

Installing protobuf, does not fix the issue.

heinrichreimer commented 8 months ago

Thanks for posting this bug report!

From the logs, it seems likely to be an issue when building the wheels for pycld3. (Unfortunately, the developers do not provide pre-built wheels for Python 3.10.) Building the wheels requires three things:

On Ubuntu, all can be installed with the following commands:

sudo apt-get update
sudo apt-get install g++ protobuf-compiler libprotobuf-dev

Could you please check if the installation works after the required libraries are installed? If not, please report back with your OS version, so that I can try to reproduce the issue with the exact same OS.

I'll also update the readme to include these steps for installation.

PS: If you need a quick workaround, you could also just comment-out the pycld3~=0.22.0 line in pyproject.toml. That package is only required for language detection in the post hoc evaluations and not used in the crawling.

heinrichreimer commented 8 months ago

I also found some places where the old module name web_archive_query_log was used instead of the new name archive_query_log. These are now fixed in 0e2063c6f65eb5092a60f60eba44a0b7d36e225a. Please git pull the latest changes.

jcchouinard commented 8 months ago

I did install protbuf either with pip install protobuf, or brew upgrade protobuf || brew install -v protobuf commands. None worked.

jcchouinard commented 8 months ago

I still get: ERROR: Failed building wheel for pycld3. I had manually made those changes to my local. Now the other challenge is it needs the click dependency: ModuleNotFoundError: No module named 'click'

heinrichreimer commented 8 months ago

Yes, when the installation of the pycld3 wheel fails, the click installation will likely also fail. Could you try deleting the following line and see if pip install -e . works then? https://github.com/webis-de/archive-query-log/blob/9e51fa5183675f9f340213b019a2c078f1473c94/pyproject.toml#L44 The logs should then no longer mention anything related to cld3.

heinrichreimer commented 8 months ago

If that still doesn't work, it would be awesome if you could include a full error log :+1:

jcchouinard commented 8 months ago

Yep! Removing https://github.com/webis-de/archive-query-log/issues/22#issuecomment-1789153969 was the solution. No need to install protobuf.