Skip to content

Instantly share code, notes, and snippets.

@ccdd13
Last active July 18, 2021 17:27
Show Gist options
  • Save ccdd13/b95789a99c6bf24469476625eccb756e to your computer and use it in GitHub Desktop.
Save ccdd13/b95789a99c6bf24469476625eccb756e to your computer and use it in GitHub Desktop.
`sudo pip3 install pykeepass` - Failed to build pykeepass construct future - fixed in https://github.com/libkeepass/pykeepass/issues/268 - https://gist.github.com/ccdd13/b95789a99c6bf24469476625eccb756e#gistcomment-3817250
++ uname -a
+ uname='Linux mx1 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux'
+ case "${uname}" in
+ case "${uname}" in
+ wget -qO - https://pkg.pujol.io/debian/gpgkey
+ sudo apt-key add -
OK
+ echo 'deb https://pkg.pujol.io/debian/repo all main'
+ sudo tee /etc/apt/sources.list.d/pkg.pujol.io.list
deb https://pkg.pujol.io/debian/repo all main
+ sudo apt-get update
Get:1 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Hit:2 http://mxlinux.mirrors.uk2.net/packages/mx/repo buster InRelease
Hit:3 http://deb.debian.org/debian buster InRelease
Get:4 http://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:5 https://pkg.pujol.io/debian/repo all InRelease [1,877 B]
Get:6 http://deb.debian.org/debian-security buster/updates/main i386 Packages [292 kB]
Get:7 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [293 kB]
Fetched 704 kB in 2s (287 kB/s)
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://pkg.pujol.io/debian/repo all InRelease' doesn't support architecture 'i386'
+ sudo apt-get install -y python3-pip python-pip python3-setuptools python3-wheel python-wheel pass pass-extension-update pass-extension-import
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libxml-simple-perl ruby python-setuptools python-setuptools-doc
Recommended packages:
qrencode xclip python3-defusedxml python3-secretstorage python3-cryptography python-all-dev python-setuptools python-keyring
python-keyrings.alt python-xdg python3-dev python3-keyring python3-keyrings.alt python3-xdg
The following NEW packages will be installed:
pass pass-extension-import pass-extension-update python-pip python-wheel python3-pip python3-setuptools python3-wheel
0 upgraded, 8 newly installed, 0 to remove and 342 not upgraded.
Need to get 0 B/830 kB of archives.
After this operation, 3,508 kB of additional disk space will be used.
Selecting previously unselected package pass.
(Reading database ... 303961 files and directories currently installed.)
Preparing to unpack .../0-pass_1.7.3-2_all.deb ...
Unpacking pass (1.7.3-2) ...
Selecting previously unselected package pass-extension-import.
Preparing to unpack .../1-pass-extension-import_3.2_all.deb ...
Unpacking pass-extension-import (3.2) ...
Selecting previously unselected package pass-extension-update.
Preparing to unpack .../2-pass-extension-update_2.1-1_all.deb ...
Unpacking pass-extension-update (2.1-1) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../3-python-pip_18.1-5_all.deb ...
Unpacking python-pip (18.1-5) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../4-python-wheel_0.32.3-2_all.deb ...
Unpacking python-wheel (0.32.3-2) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../5-python3-pip_18.1-5_all.deb ...
Unpacking python3-pip (18.1-5) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../6-python3-setuptools_40.8.0-1_all.deb ...
Unpacking python3-setuptools (40.8.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../7-python3-wheel_0.32.3-2_all.deb ...
Unpacking python3-wheel (0.32.3-2) ...
Setting up python3-setuptools (40.8.0-1) ...
Setting up python-wheel (0.32.3-2) ...
Setting up python3-wheel (0.32.3-2) ...
Setting up python-pip (18.1-5) ...
Setting up python3-pip (18.1-5) ...
Setting up pass (1.7.3-2) ...
Setting up pass-extension-update (2.1-1) ...
Setting up pass-extension-import (3.2) ...
Processing triggers for man-db (2.8.5-2) ...
+ command -V pip3
+ pip=pip3
+ sudo pip3 install --upgrade pip
Requirement already satisfied: pip in /usr/local/lib/python3.7/dist-packages (21.1.3)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
+ sudo pip3 install pyaml defusedxml pykeepass secretstorage cryptography file-magic
Requirement already satisfied: pyaml in /usr/lib/python3/dist-packages (18.11.0)
Collecting defusedxml
Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting pykeepass
Using cached pykeepass-4.0.1.tar.gz (48 kB)
Collecting secretstorage
Using cached SecretStorage-3.3.1-py3-none-any.whl (15 kB)
Collecting cryptography
Using cached cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)
Collecting file-magic
Using cached file_magic-0.4.0-py3-none-any.whl (3.9 kB)
Requirement already satisfied: argon2_cffi in /usr/local/lib/python3.7/dist-packages (from pykeepass) (20.1.0)
Requirement already satisfied: construct==2.10.54 in /usr/local/lib/python3.7/dist-packages (from pykeepass) (2.10.54)
Requirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from pykeepass) (0.18.2)
Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from pykeepass) (4.6.3)
Requirement already satisfied: pycryptodomex>=3.6.2 in /usr/local/lib/python3.7/dist-packages (from pykeepass) (3.10.1)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from pykeepass) (2.8.2)
Requirement already satisfied: jeepney>=0.6 in /usr/local/lib/python3.7/dist-packages (from secretstorage) (0.7.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography) (1.14.6)
Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography) (2.20)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from argon2_cffi->pykeepass) (1.12.0)
Building wheels for collected packages: pykeepass
Building wheel for pykeepass (setup.py) ... done
Created wheel for pykeepass: filename=pykeepass-4.0.1-py3-none-any.whl size=49856 sha256=f7b56761ceb0b27c7bb690521863d9da83df200ae69831ac5affef9925d9591f
Stored in directory: /root/.cache/pip/wheels/58/87/2a/58db5ccf1f5a01f2409184e72e8ca09a98d80ee9a7808108d0
Successfully built pykeepass
Installing collected packages: cryptography, secretstorage, pykeepass, file-magic, defusedxml
Successfully installed cryptography-3.4.7 defusedxml-0.7.1 file-magic-0.4.0 pykeepass-4.0.1 secretstorage-3.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
+ sudo pip3 install upass
Collecting upass
Using cached upass-0.3.0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: urwid in /usr/local/lib/python3.7/dist-packages (from upass) (2.1.2)
Requirement already satisfied: pyperclip in /usr/local/lib/python3.7/dist-packages (from upass) (1.8.2)
Installing collected packages: upass
Successfully installed upass-0.3.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
+ sudo pip3 install pykeepass
Collecting pykeepass
Downloading https://files.pythonhosted.org/packages/f1/08/b4b8f7bce23190ed4f34f4d9cf4f75f8a255f4f4c378296daf4b7027d2cb/pykeepass-4.0.1.tar.gz (48kB)
100% |████████████████████████████████| 51kB 195kB/s
Collecting argon2_cffi (from pykeepass)
Downloading https://files.pythonhosted.org/packages/e0/d7/5da06217807106ed6d7b4f5ccb8ec5e3f9ec969217faad4b5d1af0b55101/argon2_cffi-20.1.0-cp35-abi3-manylinux1_x86_64.whl (97kB)
100% |████████████████████████████████| 102kB 446kB/s
Collecting construct==2.10.54 (from pykeepass)
Downloading https://files.pythonhosted.org/packages/30/2f/e2e6bad1b80f744cf5c2a6d622e3dee698b43e6c040f980ae0ac0edd5e54/construct-2.10.54.tar.gz (55kB)
100% |████████████████████████████████| 61kB 671kB/s
Collecting future (from pykeepass)
Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
100% |████████████████████████████████| 829kB 434kB/s
Collecting lxml (from pykeepass)
Downloading https://files.pythonhosted.org/packages/cf/4d/6537313bf58fe22b508f08cf3eb86b29b6f9edf68e00454224539421073b/lxml-4.6.3-cp37-cp37m-manylinux1_x86_64.whl (5.5MB)
100% |████████████████████████████████| 5.5MB 117kB/s
Collecting pycryptodomex>=3.6.2 (from pykeepass)
Downloading https://files.pythonhosted.org/packages/5e/12/49071b981f96720ccf26732de16b0fea7b13b676e4fe0643d8cdb69e199e/pycryptodomex-3.10.1-cp35-abi3-manylinux1_x86_64.whl (1.9MB)
100% |████████████████████████████████| 1.9MB 285kB/s
Collecting python-dateutil (from pykeepass)
Downloading https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247kB)
100% |████████████████████████████████| 256kB 776kB/s
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from argon2_cffi->pykeepass) (1.12.0)
Collecting cffi>=1.0.0 (from argon2_cffi->pykeepass)
Downloading https://files.pythonhosted.org/packages/46/5e/2f5f83be1586e04f4f14b32c48aafb29197355cca8f62d430f915706fafa/cffi-1.14.6-cp37-cp37m-manylinux1_x86_64.whl (402kB)
100% |████████████████████████████████| 409kB 333kB/s
Collecting pycparser (from cffi>=1.0.0->argon2_cffi->pykeepass)
Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
100% |████████████████████████████████| 112kB 632kB/s
Building wheels for collected packages: pykeepass, construct, future
Running setup.py bdist_wheel for pykeepass ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jd1lylt8/pykeepass/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-igz8yuqy --python-tag cp37:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for pykeepass
Running setup.py clean for pykeepass
Running setup.py bdist_wheel for construct ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jd1lylt8/construct/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-dmjzefb8 --python-tag cp37:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for construct
Running setup.py clean for construct
Running setup.py bdist_wheel for future ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jd1lylt8/future/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-hgwjidez --python-tag cp37:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for future
Running setup.py clean for future
Failed to build pykeepass construct future
Installing collected packages: pycparser, cffi, argon2-cffi, construct, future, lxml, pycryptodomex, python-dateutil, pykeepass
Running setup.py install for construct ... done
Running setup.py install for future ... done
Running setup.py install for pykeepass ... done
Successfully installed argon2-cffi-20.1.0 cffi-1.14.6 construct-2.10.54 future-0.18.2 lxml-4.6.3 pycparser-2.20 pycryptodomex-3.10.1 pykeepass-4.0.1 python-dateutil-2.8.2
@ccdd13
Copy link
Author

ccdd13 commented Jul 18, 2021

fixed in libkeepass/pykeepass#268
fixed with sudo apt-get install -y python3-wheel python-wheel

this is my setup script for reference:

        wget -qO - https://pkg.pujol.io/debian/gpgkey | sudo apt-key add -
        echo 'deb https://pkg.pujol.io/debian/repo all main' \
        | sudo tee    /etc/apt/sources.list.d/pkg.pujol.io.list
        sudo apt-get update
        sudo apt-get install -y python3-pip python-pip python3-setuptools python3-wheel python-wheel \
                                pass \
                                pass-extension-update \
                                pass-extension-import

command -V pip3 >/dev/null && pip=pip3 || pip=pip

sudo $pip install --upgrade pip
sudo $pip install pyaml defusedxml pykeepass secretstorage cryptography file-magic
sudo $pip install upass

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