snakepacker / python Goto Github PK
View Code? Open in Web Editor NEWPython docker images
License: Apache License 2.0
Python docker images
License: Apache License 2.0
Seems like the built-in pip of python3.12 in the all image is broken:
docker run --rm -it snakepacker/python:all python3.12 -m pip
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.12/dist-packages/pip/__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/configuration.py", line 21, in <module>
from pip._internal.exceptions import (
File "/usr/local/lib/python3.12/dist-packages/pip/_internal/exceptions.py", line 7, in <module>
from pip._vendor.pkg_resources import Distribution
File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2164, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
I assume that it happens due to the installation of pip with version 21.2.4 in the all Dockerfile.
In order to fix it I would suggest updating the versions of pip, setuptools, wheel, cython and others to the latest version, or rather not lock them at all so that newer versions will work without any need to change again.
Would be happy to open a PR myself if you choose which of the options is better (locking to newer versions or removing the lock altogether)
Hi,
I just discovered your really great python images.
Nearly all of them are pretty usable for me but I'm a little bit confused why the snakepacker/python:3.9
does include Python 3.8.10 besides Python 3.9.5. Is there any reason for this? Because this seems not right to me.
When I try build Dockerfile:
`
FROM snakepacker/python:all as builder
RUN python3.8 -m venv /usr/share/python3/app
ADD requirements.txt .
RUN /usr/share/python3/app/bin/pip install -r requirements.txt
FROM snakepacker/python:3.8
COPY --from=builder /usr/share/python3/app
/usr/share/python3/app`
And this requirements.txt
chardet==4.0.0
clickhouse-driver==0.1.2
clickhouse-sqlalchemy==0.1.2
idna==2.10
numpy==1.20.1
pandas==1.2.2
psycopg2-binary==2.8.6
pycountry==20.7.3
python-dateutil==2.8.1
pytz==2021.1
requests==2.25.1
six==1.15.0
SQLAlchemy==1.3.23
tzlocal==2.1
urllib3==1.26.3
I have got this error:
`Building wheels for collected packages: clickhouse-sqlalchemy, pycountry
Building wheel for clickhouse-sqlalchemy (setup.py): started
Building wheel for clickhouse-sqlalchemy (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/share/python3/app/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-susza4lz/clickhouse-sqlalchemy/setup.py'"'"'; file='"'"'/tmp/pip-install-susza4lz/clickhouse-sqlalchemy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-y3t1pkcf
cwd: /tmp/pip-install-susza4lz/clickhouse-sqlalchemy/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
ERROR: Failed building wheel for clickhouse-sqlalchemy
Running setup.py clean for clickhouse-sqlalchemy
Building wheel for pycountry (setup.py): started
Building wheel for pycountry (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/share/python3/app/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-susza4lz/pycountry/setup.py'"'"'; file='"'"'/tmp/pip-install-susza4lz/pycountry/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-857imj2q
cwd: /tmp/pip-install-susza4lz/pycountry/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
ERROR: Failed building wheel for pycountry
Running setup.py clean for pycountry
Failed to build clickhouse-sqlalchemy pycountry`
Maybe I'm doing something wrong?
Hi ๐
We would love to use your setup to run on aarch64 machines (arm64/v8), now that more and more projects (e.g. numpy, pandas) have started publishing macosx_11_0_arm64
and manylinux2014_aarch64
wheels.
Example of official Python image architectures:
Adding multi-arch support using QEMU should be more or less straight forward, e.g. https://dev.to/cloudx/multi-arch-docker-images-the-easy-way-with-github-actions-4k54
This has been fixed in deadsnakes 2 days ago, see deadsnakes/issues#182. The last update of https://hub.docker.com/r/snakepacker/python was 19 days ago. Could you please rebuild and push?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.