aptus icon indicating copy to clipboard operation
aptus copied to clipboard

"pip install aptus" fails asking for numpy — setup_requires missing?

Open hartwork opened this issue 2 years ago • 1 comments

Hi Ned,

when trying to install aptus I get this error:

# cat Dockerfile 
FROM python:3.10
RUN pip3 install aptus

# docker pull python:3.10
3.10: Pulling from library/python
Digest: sha256:f12d5573aa14fafc4b86ac76726fabdd1216e03f2dbd82e10406f302677a3754
Status: Image is up to date for python:3.10
docker.io/library/python:3.10

# docker build --progress=plain --no-cache .
#2 [internal] load build definition from Dockerfile
#2 sha256:59179d270aefd98a6fcedcc40b98c093f80bc3817d3fa8bef7c756c7f9fb1500
#2 transferring dockerfile: 83B 0.0s done
#2 DONE 0.1s

#1 [internal] load .dockerignore
#1 sha256:b5dda02b5c8c23388cc5fa51061dcadd1e3280a53ac958e90ba16a51e619423d
#1 transferring context: 2B done
#1 DONE 0.2s

#3 [internal] load metadata for docker.io/library/python:3.10
#3 sha256:c787ec5cc33e1cbee663ba2529b5d51f0293f2c277b40d9bd37129383a68d5ac
#3 DONE 0.0s

#4 [1/2] FROM docker.io/library/python:3.10
#4 sha256:a2ee87eeef7d8a85b2b69b2a2058a6794797004a51de34df5996af39dbb895c3
#4 CACHED

#5 [2/2] RUN pip3 install aptus
#5 sha256:242390dad311f4855739deb7a4e78a0c9af1b62a93fcc46ee70c4415ccf24859
#5 2.297 Collecting aptus
#5 2.404   Downloading Aptus-3.0.1.tar.gz (94 kB)
#5 2.454      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.3/94.3 kB 1.8 MB/s eta 0:00:00
#5 2.479   Preparing metadata (setup.py): started
#5 3.072   Preparing metadata (setup.py): finished with status 'error'
#5 3.081   error: subprocess-exited-with-error
#5 3.081   
#5 3.081   × python setup.py egg_info did not run successfully.
#5 3.081   │ exit code: 1
#5 3.081   ╰─> [13 lines of output]
#5 3.081       Traceback (most recent call last):
#5 3.081         File "/tmp/pip-install-9jpijh3y/aptus_7393df3ccdc84f428c958bc7137d9c92/setup.py", line 19, in <module>
#5 3.081           import numpy
#5 3.081       ModuleNotFoundError: No module named 'numpy'
#5 3.081       
#5 3.081       During handling of the above exception, another exception occurred:
#5 3.081       
#5 3.081       Traceback (most recent call last):
#5 3.081         File "<string>", line 2, in <module>
#5 3.081         File "<pip-setuptools-caller>", line 34, in <module>
#5 3.081         File "/tmp/pip-install-9jpijh3y/aptus_7393df3ccdc84f428c958bc7137d9c92/setup.py", line 21, in <module>
#5 3.081           raise Exception("Need numpy, from http://numpy.scipy.org/")
#5 3.081       Exception: Need numpy, from http://numpy.scipy.org/
#5 3.081       [end of output]
#5 3.081   
#5 3.081   note: This error originates from a subprocess, and is likely not a problem with pip.
#5 3.084 error: metadata-generation-failed
#5 3.084 
#5 3.084 × Encountered error while generating package metadata.
#5 3.084 ╰─> See above for output.
#5 3.084 
#5 3.084 note: This is an issue with the package mentioned above, not pip.
#5 3.084 hint: See above for details.
#5 3.299 
#5 3.299 [notice] A new release of pip is available: 23.0.1 -> 23.1.2
#5 3.299 [notice] To update, run: pip install --upgrade pip
#5 ERROR: process "/bin/sh -c pip3 install aptus" did not complete successfully: exit code: 1
------
 > [2/2] RUN pip3 install aptus:
------
process "/bin/sh -c pip3 install aptus" did not complete successfully: exit code: 1

Could it be that setup.py is missing numpy in setup_requires? Should I make a pull request?

Best, Sebastian

hartwork avatar Apr 27 '23 14:04 hartwork

I don't have experience with setup_requires, so I used this low-tech approach. If that fixes it, I'd merge it. Thanks.

nedbat avatar Aug 03 '23 15:08 nedbat