Skip to content

Instantly share code, notes, and snippets.

@NickVolynkin
Created December 21, 2018 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NickVolynkin/e61a345c829df65e346b5ec876826a56 to your computer and use it in GitHub Desktop.
Save NickVolynkin/e61a345c829df65e346b5ec876826a56 to your computer and use it in GitHub Desktop.
Pipenv cannot install pyyaml==3.13 in Docker (kennethreitz/pipenv)
docker run -it -v `pwd`:/app kennethreitz/pipenv  ✘   7-create-a-minimal-bot-ci-pipeline ● ?  01:26 Dur  20:00:43
root@5525a28b4622:/app# pipenv --python 3.6
Creating a virtualenv for this project…
Pipfile: /app/Pipfile
Using /usr/bin/python3.6m (3.6.7) to create virtualenv…
⠇ Creating virtual environment...Using base prefix '/usr'
New python executable in /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python3.6m
Also creating executable in /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /usr/bin/python3.6m
✔ Successfully created virtual environment!
Virtualenv location: /root/.local/share/virtualenvs/app-4PlAip0Q
Creating a Pipfile for this project…
root@5525a28b4622:/app# pipenv install pyyaml==3.13
Installing pyyaml==3.13…
✔ Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success!
Updated Pipfile.lock (35eabc)!
Installing dependencies from Pipfile.lock (35eabc)…
An error occurred while installing pyyaml==3.13 --hash=sha256:3d7da3009c0f3e783b2c873687652d83b1bbfd5c88e9813fb7e5b03c0dd3108b --hash=sha256:3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf --hash=sha256:40c71b8e076d0550b2e6380bada1f1cd1017b882f7e16f09a65be98e017f211a --hash=sha256:558dd60b890ba8fd982e05941927a3911dc409a63dcb8b634feaa0cda69330d3 --hash=sha256:a7c28b45d9f99102fa092bb213aa12e0aaf9a6a1f5e395d36166639c1f96c3a1 --hash=sha256:aa7dd4a6a427aed7df6fb7f08a580d68d9b118d90310374716ae90b710280af1 --hash=sha256:bc558586e6045763782014934bfaf39d48b8ae85a2713117d16c39864085c613 --hash=sha256:d46d7982b62e0729ad0175a9bc7e10a566fc07b224d2c79fafb5e032727eaa04 --hash=sha256:d5eef459e30b09f5a098b9cea68bebfeb268697f78d647bd255a085371ac7f3f --hash=sha256:e01d3203230e1786cd91ccfdc8f8454c8069c91bee3962ad93b87a4b2860f537 --hash=sha256:e170a9e6fcfd19021dd29845af83bb79236068bf5fd4df3327c1be18182b2531! Will try again.
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:02
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/dist-packages/pipenv/core.py", line 1992, in do_install
[pipenv.exceptions.InstallError]: skip_lock=skip_lock,
[pipenv.exceptions.InstallError]: File "/usr/local/lib/python3.7/dist-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/dist-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/dist-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/dist-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 pyyaml==3.13 (from -r /tmp/pipenv-4jlz7mbi-requirements/pipenv-36o3muc4-requirement.txt (line 1))', ' Using cached https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz', 'Building wheels for collected packages: pyyaml', ' Running setup.py bdist_wheel for pyyaml: started', " Running setup.py bdist_wheel for pyyaml: finished with status 'error'", ' Complete output from command /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python3.6m -u -c "import setuptools, tokenize;__file__=\'/tmp/pip-install-o41ecx85/pyyaml/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-t2bkplmq --python-tag cp36:', ' running bdist_wheel', ' running build', ' running build_py', ' creating build', ' creating build/lib.linux-x86_64-3.6', ' creating build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/parser.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/loader.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/cyaml.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/constructor.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/reader.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/tokens.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/resolver.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/dumper.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/serializer.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/__init__.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/events.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/emitter.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/error.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/nodes.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/scanner.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/composer.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/representer.py -> build/lib.linux-x86_64-3.6/yaml', ' warning: build_py: byte-compiling is disabled, skipping.', ' ', ' running build_ext', ' creating build/temp.linux-x86_64-3.6', ' checking if libyaml is compilable', ' x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/root/.local/share/virtualenvs/app-4PlAip0Q/include/python3.6m -c build/temp.linux-x86_64-3.6/check_libyaml.c -o build/temp.linux-x86_64-3.6/check_libyaml.o', ' checking if libyaml is linkable', ' x86_64-linux-gnu-gcc -pthread build/temp.linux-x86_64-3.6/check_libyaml.o -lyaml -o build/temp.linux-x86_64-3.6/check_libyaml', " building '_yaml' extension", ' creating build/temp.linux-x86_64-3.6/ext', ' x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/root/.local/share/virtualenvs/app-4PlAip0Q/include/python3.6m -c ext/_yaml.c -o build/temp.linux-x86_64-3.6/ext/_yaml.o', ' ext/_yaml.c:4:10: fatal error: Python.h: No such file or directory', ' #include "Python.h"', ' ^~~~~~~~~~', ' compilation terminated.', " error: command 'x86_64-linux-gnu-gcc' failed with exit status 1", ' ', ' ----------------------------------------', ' Running setup.py clean for pyyaml', 'Failed to build pyyaml', 'Installing collected packages: pyyaml', ' Running setup.py install for pyyaml: started', " Running setup.py install for pyyaml: finished with status 'error'", ' Complete output from command /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python3.6m -u -c "import setuptools, tokenize;__file__=\'/tmp/pip-install-o41ecx85/pyyaml/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-on5d0hca/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/virtualenvs/app-4PlAip0Q/include/site/python3.6/pyyaml:', ' running install', ' running build', ' running build_py', ' creating build', ' creating build/lib.linux-x86_64-3.6', ' creating build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/parser.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/loader.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/cyaml.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/constructor.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/reader.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/tokens.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/resolver.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/dumper.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/serializer.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/__init__.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/events.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/emitter.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/error.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/nodes.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/scanner.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/composer.py -> build/lib.linux-x86_64-3.6/yaml', ' copying lib3/yaml/representer.py -> build/lib.linux-x86_64-3.6/yaml', ' warning: build_py: byte-compiling is disabled, skipping.', ' ', ' running build_ext', ' creating build/temp.linux-x86_64-3.6', ' checking if libyaml is compilable', ' x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/root/.local/share/virtualenvs/app-4PlAip0Q/include/python3.6m -c build/temp.linux-x86_64-3.6/check_libyaml.c -o build/temp.linux-x86_64-3.6/check_libyaml.o', ' checking if libyaml is linkable', ' x86_64-linux-gnu-gcc -pthread build/temp.linux-x86_64-3.6/check_libyaml.o -lyaml -o build/temp.linux-x86_64-3.6/check_libyaml', " building '_yaml' extension", ' creating build/temp.linux-x86_64-3.6/ext', ' x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/root/.local/share/virtualenvs/app-4PlAip0Q/include/python3.6m -c ext/_yaml.c -o build/temp.linux-x86_64-3.6/ext/_yaml.o', ' ext/_yaml.c:4:10: fatal error: Python.h: No such file or directory', ' #include "Python.h"', ' ^~~~~~~~~~', ' compilation terminated.', " error: command 'x86_64-linux-gnu-gcc' failed with exit status 1", ' ', ' ----------------------------------------']
[pipenv.exceptions.InstallError]: ['Failed building wheel for pyyaml', 'Command "/root/.local/share/virtualenvs/app-4PlAip0Q/bin/python3.6m -u -c "import setuptools, tokenize;__file__=\'/tmp/pip-install-o41ecx85/pyyaml/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-on5d0hca/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/virtualenvs/app-4PlAip0Q/include/site/python3.6/pyyaml" failed with error code 1 in /tmp/pip-install-o41ecx85/pyyaml/']
ERROR: ERROR: Package installation failed...
☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:02
root@5525a28b4622:/app#
@yh-iro
Copy link

yh-iro commented Dec 3, 2019

I'm also facing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment