qoi icon indicating copy to clipboard operation
qoi copied to clipboard

qoi-0.2.0: ModuleNotFoundError: No module named 'numpy'

Open jxtps opened this issue 2 years ago • 0 comments

I'm trying to install qoi when building a docker image on ubuntu 20.04, but get the following:

Step 3/3 : RUN pip install --no-cache-dir       numpy   qoi     opencv-python   scikit-image    pillow  torchvision     hdf5storage     ninja   timm    pgmagick        tensorboard     matplotlib
 ---> Running in 9edd47a3e8be
Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (1.21.5)
Collecting qoi
  Downloading qoi-0.2.0.tar.gz (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 19.7 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Traceback (most recent call last):
        File "/opt/conda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/opt/conda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/conda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-_t96qhcs/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-_t96qhcs/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-_t96qhcs/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 3, in <module>
      ModuleNotFoundError: No module named 'numpy'
      [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.
The command '/bin/sh -c pip install --no-cache-dir      numpy   qoi     opencv-python   scikit-image    pillow  torchvision     hdf5storage     ninja   timm    pgmagick        tensorboard     matplotlib' returned a non-zero code: 1

So numpy is installed, but the qoi installer fails to find it I guess?

This also happens with v0.1.2, but not with v0.1.1.

Lightly edited Dockerfile (removing some slow and unrelated dependencies):

FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime

# Always run apt-get update and install in a single line, or it runs into caching issues
RUN apt-get update && apt-get install -y \
	ffmpeg \
	libsm6 \
	libxext6

# I tried pip requirements file but it didn't immediately work, so just switched to listing the packages
RUN pip install --no-cache-dir \
	numpy \
	qoi

jxtps avatar Aug 26 '22 00:08 jxtps