- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在基于 python37-alpine 的 docker 镜像中安装 pendulum 2.0.5,但它给了我以下错误:
Installing dependencies from Pipfile.lock (0157fa)…
An error occurred while installing pendulum==2.0.5 --hash=sha256:1cde6e3c6310fb882c98f373795f807cb2bd6af01f34d2857e6e283b5ee91e09 --hash=sha256:485aef2089defee88607d37d5bc238934d0b90993d7bf9ceb36e481af41e9c66 --hash=sha256:57801754e05f30e8a7e4d24734c9fad82c6c3ec489151555f0fc66bb32ba6d6d --hash=sha256:7ee344bc87cb425b04717b90d14ffde14c1dd64eaa73060b3772edcf57f3e866 --hash=sha256:c460f4d8dc41ec3c4377ac1807678cd72fe5e973cc2943c104ffdeaac32dacb7 --hash=sha256:d3078e007315a959989c41cee5cfd63cfeeca21dd3d8295f4bc24199489e9b6c! Will try again.
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting pendulum==2.0.5', ' Using cached https://files.pythonhosted.org/packages/e0/f9/ea90c2c8f0d9b6a733f6231fac6d07476b68271bcf02bab0053888ea0fb3/pendulum-2.0.5.tar.gz', ' Installing build dependencies: started', " Installing build dependencies: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', " command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-36izf7_5/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=0.12'", ' cwd: None', ' Complete output (177 lines):', ' Collecting poetry>=0.12', ' Using cached https://files.pythonhosted.org/packages/d9/ca/6db99ba6be273b13ba3747ccfcc357714dd60c887d1f2598119ee1909262/poetry-1.0.0-py2.py3-none-any.whl', ' Collecting html5lib<2.0,>=1.0', ' Using cached https://files.pythonhosted.org/packages/a5/62/bbd2be0e7943ec8504b517e62bab011b4946e1258842bc159e5dfde15b96/html5lib-1.0.1-py2.py3-none-any.whl', ' Collecting pyparsing<3.0,>=2.2', ' Using cached https://files.pythonhosted.org/packages/c0/0c/fc2e007d9a992d997f04a80125b0f183da7fb554f1de701bbb70a8e7d479/pyparsing-2.4.5-py2.py3-none-any.whl', ' Collecting cachecontrol[filecache]<0.13.0,>=0.12.4', ' Using cached https://files.pythonhosted.org/packages/5e/f0/2c193ed1f17c97ae539da7e1c2d48b80d8cccb1917163b26a91ca4355aa6/CacheControl-0.12.5.tar.gz', ' Collecting requests-toolbelt<0.9.0,>=0.8.0', ' Using cached https://files.pythonhosted.org/packages/97/8a/d710f792d6f6ecc089c5e55b66e66c3f2f35516a1ede5a8f54c13350ffb0/requests_toolbelt-0.8.0-py2.py3-none-any.whl', ' Collecting pexpect<5.0.0,>=4.7.0', ' Using cached https://files.pythonhosted.org/packages/0e/3e/377007e3f36ec42f1b84ec322ee12141a9e10d808312e5738f52f80a232c/pexpect-4.7.0-py2.py3-none-any.whl', ' Collecting pyrsistent<0.15.0,>=0.14.2', ' Using cached https://files.pythonhosted.org/packages/8c/46/4e93ab8a379d7efe93f20a0fb8a27bdfe88942cc954ab0210c3164e783e0/pyrsistent-0.14.11.tar.gz', ' Collecting keyring<20.0,>=19.0; python_version >= "3.5" and python_version < "4.0"', ' Using cached https://files.pythonhosted.org/packages/70/33/8a7aa9da0cbdd26cd13ccfdab34da47bf561e9587d6cbf02f9d48d717047/keyring-19.3.0-py2.py3-none-any.whl', ' Collecting tomlkit<0.6.0,>=0.5.8', ' Using cached https://files.pythonhosted.org/packages/3e/30/7c2693fc50bd466285ec22bf02ee344be1bde3e2e8267e302fdc82d11f2d/tomlkit-0.5.8-py2.py3-none-any.whl', ' Collecting pkginfo<2.0,>=1.4', ' Using cached https://files.pythonhosted.org/packages/e6/d5/451b913307b478c49eb29084916639dc53a88489b993530fed0a66bab8b9/pkginfo-1.5.0.1-py2.py3-none-any.whl', ' Collecting importlib-metadata<0.24,>=0.23; python_version < "3.8"', ' Using cached https://files.pythonhosted.org/packages/f6/d2/40b3fa882147719744e6aa50ac39cf7a22a913cbcba86a0371176c425a3b/importlib_metadata-0.23-py2.py3-none-any.whl', ' Collecting jsonschema<4.0,>=3.1', ' Using cached https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl', ' Collecting cleo<0.8.0,>=0.7.6', ' Using cached https://files.pythonhosted.org/packages/4b/9d/10a5923c14c4f0faa98216af5262938f468af76101d9cd124ad2054943c7/cleo-0.7.6-py2.py3-none-any.whl', ' Collecting requests<3.0,>=2.18', ' Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl', ' Collecting cachy<0.4.0,>=0.3.0', ' Using cached https://files.pythonhosted.org/packages/82/e6/badd9af6feee43e76c3445b2621a60d3d99fe0e33fffa8df43590212ea63/cachy-0.3.0-py2.py3-none-any.whl', ' Collecting clikit<0.5.0,>=0.4.1', ' Using cached https://files.pythonhosted.org/packages/2c/08/b826f8336109e6d3e27193b752e3e23dfbc1aa7fd5f4806e48d37f20794b/clikit-0.4.1-py2.py3-none-any.whl', ' Collecting shellingham<2.0,>=1.1', ' Using cached https://files.pythonhosted.org/packages/2d/ac/e8a34d4b3d24bf554f40651b2aac549a3fc7223725bf10fbdfe2083b6372/shellingham-1.3.1-py2.py3-none-any.whl', ' Collecting webencodings', ' Using cached https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl', ' Collecting six>=1.9', ' Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl', ' Collecting msgpack', ' Using cached https://files.pythonhosted.org/packages/74/0a/de673c1c987f5779b65ef69052331ec0b0ebd22958bda77a8284be831964/msgpack-0.6.2.tar.gz', ' Collecting lockfile>=0.9', ' Using cached https://files.pythonhosted.org/packages/c8/22/9460e311f340cb62d26a38c419b1381b8593b0bb6b5d1f056938b086d362/lockfile-0.12.2-py2.py3-none-any.whl', ' Collecting ptyprocess>=0.5', ' Using cached https://files.pythonhosted.org/packages/d1/29/605c2cc68a9992d18dada28206eeada56ea4bd07a239669da41674648b6f/ptyprocess-0.6.0-py2.py3-none-any.whl', ' Collecting secretstorage; sys_platform == "linux"', ' Using cached https://files.pythonhosted.org/packages/82/59/cb226752e20d83598d7fdcabd7819570b0329a61db07cfbdd21b2ef546e3/SecretStorage-3.1.1-py3-none-any.whl', ' Collecting zipp>=0.5', ' Using cached https://files.pythonhosted.org/packages/74/3d/1ee25a26411ba0401b43c6376d2316a71addcc72ef8690b101b4ea56d76a/zipp-0.6.0-py2.py3-none-any.whl', ' Collecting setuptools', ' Using cached https://files.pythonhosted.org/packages/54/28/c45d8b54c1339f9644b87663945e54a8503cfef59cf0f65b3ff5dd17cf64/setuptools-42.0.2-py2.py3-none-any.whl', ' Collecting attrs>=17.4.0', ' Using cached https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl', ' Collecting idna<2.9,>=2.5', ' Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl', ' Collecting chardet<3.1.0,>=3.0.2', ' Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl', ' Collecting certifi>=2017.4.17', ' Using cached https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl', ' Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1', ' Using cached https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl', ' Collecting pastel<0.2.0,>=0.1.0', ' Using cached https://files.pythonhosted.org/packages/09/b9/ca6434777928cc4e25cd17a8d2a913f3c2877ce54c5a7b7c18bf646ff257/pastel-0.1.1-py2.py3-none-any.whl', ' Collecting pylev<2.0,>=1.3', ' Using cached https://files.pythonhosted.org/packages/40/1c/7dff1d242bf1e19f9c6202f0ba4e6fd18cc7ecb8bc85b17b2d16c806e228/pylev-1.3.0-py2.py3-none-any.whl', ' Collecting cryptography', ' Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz', ' Installing build dependencies: started', " Installing build dependencies: finished with status 'error'", ' ERROR: Command errored out with exit status 1:', ' command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-kz9j2top/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- \'setuptools>=40.6.0\' wheel \'cffi>=1.8,!=1.11.3; platform_python_implementation != \'"\'"\'PyPy\'"\'"\'\'', ' cwd: None', ' Complete output (103 lines):', ' Collecting setuptools>=40.6.0', ' Using cached https://files.pythonhosted.org/packages/54/28/c45d8b54c1339f9644b87663945e54a8503cfef59cf0f65b3ff5dd17cf64/setuptools-42.0.2-py2.py3-none-any.whl', ' Collecting wheel', ' Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl', ' Collecting cffi!=1.11.3,>=1.8', ' Using cached https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz', ' Processing /root/.cache/pipenv/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511/pycparser-2.19-py2.py3-none-any.whl', ' Building wheels for collected packages: cffi', ' Building wheel for cffi (setup.py): started', " Building wheel for cffi (setup.py): finished with status 'error'", ' ERROR: Command errored out with exit status 1:', ' command: /usr/local/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-mnl5c7mn/cffi/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-mnl5c7mn/cffi/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-w09zleho --python-tag cp37', ' cwd: /tmp/pip-install-mnl5c7mn/cffi/', ' Complete output (38 lines):', ' running bdist_wheel', ' running build', ' running build_py', ' creating build', ' creating build/lib.linux-x86_64-3.7', ' creating build/lib.linux-x86_64-3.7/cffi', ' copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi', ' warning: build_py: byte-compiling is disabled, skipping.', ' ', ' running build_ext', " building '_cffi_backend' extension", ' creating build/temp.linux-x86_64-3.7', ' creating build/temp.linux-x86_64-3.7/c', ' gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o', ' c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory', ' #include <ffi.h>', ' ^~~~~~~', ' compilation terminated.', " error: command 'gcc' failed with exit status 1", ' ----------------------------------------', ' ERROR: Failed building wheel for cffi', ' Running setup.py clean for cffi', ' Failed to build cffi', ' Installing collected packages: setuptools, wheel, pycparser, cffi', ' Running setup.py install for cffi: started', " Running setup.py install for cffi: finished with status 'error'", ' ERROR: Command errored out with exit status 1:', ' command: /usr/local/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-mnl5c7mn/cffi/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-mnl5c7mn/cffi/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-a3ja5ffv/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-kz9j2top/overlay --compile', ' cwd: /tmp/pip-install-mnl5c7mn/cffi/', ' Complete output (38 lines):', ' running install', ' running build', ' running build_py', ' creating build', ' creating build/lib.linux-x86_64-3.7', ' creating build/lib.linux-x86_64-3.7/cffi', ' copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi', ' copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi', ' warning: build_py: byte-compiling is disabled, skipping.', ' ', ' running build_ext', " building '_cffi_backend' extension", ' creating build/temp.linux-x86_64-3.7', ' creating build/temp.linux-x86_64-3.7/c', ' gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o', ' c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory', ' #include <ffi.h>', ' ^~~~~~~', ' compilation terminated.', " error: command 'gcc' failed with exit status 1", ' ----------------------------------------', ' ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-mnl5c7mn/cffi/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-mnl5c7mn/cffi/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-a3ja5ffv/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-kz9j2top/overlay --compile Check the logs for full command output.', ' ----------------------------------------', ' ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-kz9j2top/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- \'setuptools>=40.6.0\' wheel \'cffi>=1.8,!=1.11.3; platform_python_implementation != \'"\'"\'PyPy\'"\'"\'\' Check the logs for full command output.', ' ----------------------------------------', "ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-36izf7_5/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=0.12' Check the logs for full command output."]
ERROR: ERROR: Package installation failed...
FROM python:3.7-alpine
# Install nodejs, npm and vim
RUN apk add --update --no-cache nodejs npm vim curl
# To handle 'not get uid/gid'
RUN npm config set unsafe-perm true
# install serverless framework
RUN npm install -g serverless@${SLS_VERSION}
# install base dependencies
RUN apk add --no-cache build-base \
&& pip install pipenv awscli
# change work directory
WORKDIR /app
# Copy NPM dependencies files
ADD package.json package-lock.json ./
# install serverless dependencies
RUN npm install
# Copy python dependencies file
ADD Pipfile Pipfile.lock ./
# install python dependencies
RUN pipenv install --system --deploy --ignore-pipfile --dev
ADD docker-init.sh .
# Expose the ports to host
EXPOSE 3000 4000 4001
最佳答案
您需要安装 libffi-dev
可能 openssl-dev
以及(如果没有可用的 C 编译器,则加上 C 编译器)因为 cffi
和 cryptography
要求这些包针对系统库进行编译。通常这些包都有二进制轮子可用,但 Alpine 使用不同的 libc,它与 manylinux
不兼容。规范,所以你必须自己编译它。
关于python-3.7 - 无法在 python3.7-alpine docker 镜像上安装钟摆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59390658/
我正在处理一组标记为 160 个组的 173k 点。我想通过合并最接近的(到 9 或 10 个组)来减少组/集群的数量。我搜索过 sklearn 或类似的库,但没有成功。 我猜它只是通过 knn 聚类
我有一个扁平数字列表,这些数字逻辑上以 3 为一组,其中每个三元组是 (number, __ignored, flag[0 or 1]),例如: [7,56,1, 8,0,0, 2,0,0, 6,1,
我正在使用 pipenv 来管理我的包。我想编写一个 python 脚本来调用另一个使用不同虚拟环境(VE)的 python 脚本。 如何运行使用 VE1 的 python 脚本 1 并调用另一个 p
假设我有一个文件 script.py 位于 path = "foo/bar/script.py"。我正在寻找一种在 Python 中通过函数 execute_script() 从我的主要 Python
这听起来像是谜语或笑话,但实际上我还没有找到这个问题的答案。 问题到底是什么? 我想运行 2 个脚本。在第一个脚本中,我调用另一个脚本,但我希望它们继续并行,而不是在两个单独的线程中。主要是我不希望第
我有一个带有 python 2.5.5 的软件。我想发送一个命令,该命令将在 python 2.7.5 中启动一个脚本,然后继续执行该脚本。 我试过用 #!python2.7.5 和http://re
我在 python 命令行(使用 python 2.7)中,并尝试运行 Python 脚本。我的操作系统是 Windows 7。我已将我的目录设置为包含我所有脚本的文件夹,使用: os.chdir("
剧透:部分解决(见最后)。 以下是使用 Python 嵌入的代码示例: #include int main(int argc, char** argv) { Py_SetPythonHome
假设我有以下列表,对应于及时的股票价格: prices = [1, 3, 7, 10, 9, 8, 5, 3, 6, 8, 12, 9, 6, 10, 13, 8, 4, 11] 我想确定以下总体上最
所以我试图在选择某个单选按钮时更改此框架的背景。 我的框架位于一个类中,并且单选按钮的功能位于该类之外。 (这样我就可以在所有其他框架上调用它们。) 问题是每当我选择单选按钮时都会出现以下错误: co
我正在尝试将字符串与 python 中的正则表达式进行比较,如下所示, #!/usr/bin/env python3 import re str1 = "Expecting property name
考虑以下原型(prototype) Boost.Python 模块,该模块从单独的 C++ 头文件中引入类“D”。 /* file: a/b.cpp */ BOOST_PYTHON_MODULE(c)
如何编写一个程序来“识别函数调用的行号?” python 检查模块提供了定位行号的选项,但是, def di(): return inspect.currentframe().f_back.f_l
我已经使用 macports 安装了 Python 2.7,并且由于我的 $PATH 变量,这就是我输入 $ python 时得到的变量。然而,virtualenv 默认使用 Python 2.6,除
我只想问如何加快 python 上的 re.search 速度。 我有一个很长的字符串行,长度为 176861(即带有一些符号的字母数字字符),我使用此函数测试了该行以进行研究: def getExe
list1= [u'%app%%General%%Council%', u'%people%', u'%people%%Regional%%Council%%Mandate%', u'%ppp%%Ge
这个问题在这里已经有了答案: Is it Pythonic to use list comprehensions for just side effects? (7 个答案) 关闭 4 个月前。 告
我想用 Python 将两个列表组合成一个列表,方法如下: a = [1,1,1,2,2,2,3,3,3,3] b= ["Sun", "is", "bright", "June","and" ,"Ju
我正在运行带有最新 Boost 发行版 (1.55.0) 的 Mac OS X 10.8.4 (Darwin 12.4.0)。我正在按照说明 here构建包含在我的发行版中的教程 Boost-Pyth
学习 Python,我正在尝试制作一个没有任何第 3 方库的网络抓取工具,这样过程对我来说并没有简化,而且我知道我在做什么。我浏览了一些在线资源,但所有这些都让我对某些事情感到困惑。 html 看起来
我是一名优秀的程序员,十分优秀!