Developer install fails for version 4.2.2 on Arch Linux
I'm using Python 3.10.4 and I get the following error when trying to install dependencies.
$ python3 -m pip install --user -e .
Obtaining file:///home/maria/Workspace/electrum
Requirement already satisfied: qrcode in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (7.3.1)
Requirement already satisfied: protobuf<4,>=3.12 in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (3.20.1)
Requirement already satisfied: qdarkstyle>=2.7 in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (3.1)
Requirement already satisfied: aiorpcx<0.23,>=0.22.0 in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (0.22.1)
Requirement already satisfied: aiohttp<4.0.0,>=3.3.0 in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (3.8.1)
Requirement already satisfied: aiohttp_socks>=0.3 in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (0.7.1)
Requirement already satisfied: certifi in /usr/lib/python3.10/site-packages (from Electrum==4.3.0a0) (2021.10.8)
Requirement already satisfied: bitstring in /home/maria/.local/lib/python3.10/site-packages (from Electrum==4.3.0a0) (3.1.9)
Requirement already satisfied: attrs>=19.2.0 in /usr/lib/python3.10/site-packages (from Electrum==4.3.0a0) (21.4.0)
Requirement already satisfied: dnspython>=2.0 in /usr/lib/python3.10/site-packages (from Electrum==4.3.0a0) (2.2.1)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (2.0.12)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (6.0.2)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (4.0.2)
Requirement already satisfied: yarl<2.0,>=1.0 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (1.7.2)
Requirement already satisfied: frozenlist>=1.1.1 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (1.3.0)
Requirement already satisfied: aiosignal>=1.1.2 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (1.2.0)
Requirement already satisfied: python-socks[asyncio]<3.0.0,>=2.0.0 in /home/maria/.local/lib/python3.10/site-packages (from aiohttp_socks>=0.3->Electrum==4.3.0a0) (2.0.3)
Requirement already satisfied: qtpy>=1.9 in /home/maria/.local/lib/python3.10/site-packages (from qdarkstyle>=2.7->Electrum==4.3.0a0) (2.1.0)
Requirement already satisfied: packaging in /usr/lib/python3.10/site-packages (from qtpy>=1.9->qdarkstyle>=2.7->Electrum==4.3.0a0) (21.3)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3.10/site-packages (from yarl<2.0,>=1.0->aiohttp<4.0.0,>=3.3.0->Electrum==4.3.0a0) (3.3)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/lib/python3.10/site-packages (from packaging->qtpy>=1.9->qdarkstyle>=2.7->Electrum==4.3.0a0) (3.0.9)
Installing collected packages: Electrum
Running setup.py develop for Electrum
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/maria/Workspace/electrum/setup.py'"'"'; __file__='"'"'/home/maria/Workspace/electrum/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
cwd: /home/maria/Workspace/electrum/
Complete output (28 lines):
running develop
/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:157: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/maria/Workspace/electrum/setup.py", line 57, in <module>
setup(
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 985, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/lib/python3.10/site-packages/setuptools/command/develop.py", line 52, in finalize_options
easy_install.finalize_options(self)
File "/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 276, in finalize_options
self._fix_install_dir_for_user_site()
File "/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 382, in _fix_install_dir_for_user_site
self.create_home_path()
File "/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 1338, in create_home_path
if path.startswith(home) and not os.path.isdir(path):
AttributeError: 'int' object has no attribute 'startswith'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/maria/Workspace/electrum/setup.py'"'"'; __file__='"'"'/home/maria/Workspace/electrum/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.
Maybe there is something weird in your environment... what version of setuptools are you using?
This seems to be an issue with Arch Linux. If I add setuptools==61.3.1 to the requirements.txt then the install will work. However, the next time I try to install dependencies I'll get a different error referenced here: https://github.com/pypa/pip/issues/9348
I have to run pip uninstall setuptools to get pip working again like suggested in the issue I linked.
My setuptools version is 60.6.0 I think.
pacman -Ss python-setuptools
extra/python-setuptools 1:60.6.0-1 [installed]
Easily download, build, install, upgrade, and uninstall Python packages
I have to run
pip uninstall setuptoolsto get pip working again like suggested in the issue I linked.
So does installing Electrum work after that? i.e. can the issue be closed?
I'm not sure. Maybe there should be a setuptools version requirement. I can work around the problem until Arch Linux updates setuptools.
Closing. Feel free to re-open if you think the problem is with Electrum.