Bunsly / JobSpy

Jobs scraper library for LinkedIn, Indeed, Glassdoor & ZipRecruiter
https://usejobspy.com
MIT License
767 stars 142 forks source link

I can't install python-jobspy on my venv python3.12.1 #75

Closed pedrobarthrodrigues closed 9 months ago

pedrobarthrodrigues commented 9 months ago

I can't install python-jobspy on my venv python3.12.1. I'm getting the AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? error. I've tried many different methods but it always comes back to this.

ytalp17 commented 9 months ago

creating an environment with different python version could be an alternative solution

ZacharyHampton commented 9 months ago

Hey, try this out: https://stackoverflow.com/a/77364602

We only use Python 3.10 over here, so we hadn't ran into this issue.

ichigomiruku commented 6 months ago

I believe this error is caused by the numpy version being installed. I got the same error using Python 3.12.2:

Collecting python-jobspy
  Using cached python_jobspy-1.1.51-py3-none-any.whl.metadata (9.1 kB)
Collecting NUMPY==1.24.2 (from python-jobspy)
  Using cached numpy-1.24.2.tar.gz (10.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):.
...
        File "/tmp/pip-build-env-l2py4ewa/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

I was able to successfully install from a local directory after changing the version for numpy in pyproject.toml to 1.26.4.