Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-dev is not installed #23

Closed
riverhill527 opened this issue May 12, 2021 · 2 comments
Closed

python-dev is not installed #23

riverhill527 opened this issue May 12, 2021 · 2 comments

Comments

@riverhill527
Copy link

I check for python-dev its not there

$ apt list --installed | grep python

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpython-stdlib/now 2.7.16-1 amd64 [installed,local]
libpython2-stdlib/now 2.7.16-1 amd64 [installed,local]
libpython2.7-minimal/now 2.7.16-2+deb10u1 amd64 [installed,local]
libpython2.7-stdlib/now 2.7.16-2+deb10u1 amd64 [installed,local]
libpython3-stdlib/now 3.7.3-1 amd64 [installed,local]
libpython3.7-minimal/now 3.7.3-2+deb10u3 amd64 [installed,local]
libpython3.7-stdlib/now 3.7.3-2+deb10u3 amd64 [installed,local]
python-minimal/now 2.7.16-1 amd64 [installed,local]
python2-minimal/now 2.7.16-1 amd64 [installed,local]
python2.7-minimal/now 2.7.16-2+deb10u1 amd64 [installed,local]
python2.7/now 2.7.16-2+deb10u1 amd64 [installed,local]
python2/now 2.7.16-1 amd64 [installed,local]
python3-distutils/now 3.7.3-1 all [installed,local]
python3-lib2to3/now 3.7.3-1 all [installed,local]
python3-minimal/now 3.7.3-1 amd64 [installed,local]
python3.7-minimal/now 3.7.3-2+deb10u3 amd64 [installed,local]
python3.7/now 3.7.3-2+deb10u3 amd64 [installed,local]
python3/now 3.7.3-1 amd64 [installed,local]
python/now 2.7.16-1 amd64 [installed,local]

for the docker image
nikolaik/python-nodejs:python3.7-nodejs15

Its needed for psycopg2

i get this error

./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
@nikolaik
Copy link
Owner

These images are built on the Docker Official Image packaging for python base image which does not use the debian distributed python package, but instead builds it's own. That's why the python-dev package is not there, and you'll find the header files under /usr/local instead.

$ docker run nikolaik/python-nodejs:python3.7-nodejs15 find / -name Python.h
/usr/local/include/python3.7m/Python.h

My guess is that your are using debian packaged python3 which gives you problems. Weirdly the image contains three python executables, two of them (under /usr/bin/) are for OS purposes and are not intended for use in these images. You should be using the executable at /usr/local/bin/python3 or /usr/local/bin/python which should be at the front of your PATH. How are you running python, are you referencing /usr/bin/python3 somewhere?

@nikolaik
Copy link
Owner

nikolaik commented Aug 25, 2021

If this pops up again, I'll add the above info to the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants