Closed raindogdance closed 4 years ago
I am one step further now because I managed to get python3 to be 3.9 and Joinmarket installation doesn't produce the error in the OP anymore.
However, JM installation still doesn't finish, it quits after a while of running with the following message:
make[2]: Leaving directory '/home/bitcoin/joinmarket-clientserver-0.8.0/deps/libsodium-1.0.18' make[1]: Leaving directory '/home/bitcoin/joinmarket-clientserver-0.8.0/deps/libsodium-1.0.18' /home/bitcoin/joinmarket-clientserver-0.8.0/deps /home/bitcoin/joinmarket-clientserver-0.8.0 /home/bitcoin/joinmarket-clientserver-0.8.0 ./install.sh: line 317: pip: command not found Joinmarket was not installed. Exiting. ./install.sh: line 476: deactivate: command not found
I am suspecting that perhaps there is something wrong with my Python installation? When I run ./install.sh --without-qt
, I get the question Directory jmvenv exists. Remove and recreate? (y/n)
and when I choose n
, the installation process runs on and produces the error above.
If I choose y
, the following error appears right away:
Directory jmvenv exists. Remove and recreate? (y/n) y
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 6, in
Not sure, my test RPi has Python 3.7.3. By looking at error messages, there is pip and virtualenv (and probably some more dependencies) missing for a specific python version.
Out of lack of ideas I installed Python 3.7 but still having the same issue error message, so it seems that something is not quite working out with my Python installation?
/home/bitcoin/joinmarket $ sudo ./install.sh --without-qt
Directory jmvenv exists. Remove and recreate? (y/n) y
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3261, in <module>
@_call_aside
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3245, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3274, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'virtualenv==15.1.0' distribution was not found and is required by the application
Joinmarket virtualenv could not be setup. Exiting.
Seeing that the error message is complaining about virtualenv
, I also tried to install it manually, but then it says it is already installed:
`sudo apt-get install python-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-virtualenv is already the newest version (15.1.0+ds-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.`
Seeing that the error message is complaining about virtualenv, I also tried to install it manually, but then it says it is already installed
Try to install it for python3:
sudo apt-get install python3-virtualenv
Same output:
sudo apt-get install python3-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-virtualenv is already the newest version (15.1.0+ds-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I'm thinking if a cleaner solution might be to reinstall my whole Raspibolt from scratch, since then I would be able to install it with a newer Raspbian version ("buster" instead of "stretch"), which perhaps might help (I'd hope that it would have a higher Python version by default)?
And currently my Raspibolt setup was done by an older version of Stadicus' guide which included different users, and that caused issues with Joinmarket in the past: https://github.com/kristapsk/raspibolt-extras/issues/4#issuecomment-611438818, although it doesn't look like this is the issue here.
Otherwise I'm out of ideas for now.
Thinking about it more, I suspect this might be an issue of me screwing up the installation path of Python somehow. By default it got installed into /usr/local/bin
but then I wasn't able to update Python3 with it, so I installed it into /usr/bin
(by using the command ./configure --prefix=/usr
as recommended here).
I was able to see the file virtualenv
when going into the folder /usr/bin and I had the idea to remove and reinstall it. I used sudo apt-get --purge remove virtualenv
and it disappeared from /usr/bin. But when I do sudo apt-get install python-virtualenv
it once again returns python3-virtualenv is already the newest version (15.1.0+ds-1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
.
This makes me think it's an issue of Python installation paths somehow? Perhaps Joinmarket looks for virtualenv in the "wrong" location? If so, is it possible to install virtualenv into the "right" location? And would it be worth it in the first place, since perhaps this is only one problem and other dependencies are also in the "wrong" place and will cause issues down the road? I'm guessing in the dark now and don't have much idea of how linux command line works, so might be wrong here.
Edit: tried once again to install the same Python version with the default installation path, which looked successful, but still having the same initial error when installing Joinmarket: pkg_resources.DistributionNotFound: The 'virtualenv==15.1.0' distribution was not found and is required by the application Joinmarket virtualenv could not be setup. Exiting.
I think your issue is that you installed Python manually and apt-get doesn't know anything about that, so it doesn't install virtualenv for that version of Python.
Yes, this sounds like the most probable explanation.
What might be my best option here? I think manually tinkering with Python installation is a bit over my head as a command line noob and might be causing issues further down the road somewhere. So my only idea is to re-install my Raspibolt from scratch, hoping that a newer version will also have a newer Python version by default. Is this a reasonable hope?
Re-doing everything from scratch is really annoying but don't have any other idea for now. If anyone has an estimation how likely a re-install will help, it would be greatly appreciated. I have a Raspberry Pi 3, and the current Raspbian version is showing as VERSION="9 (stretch)"
, which seems to be from 2017.
Yes, that sounds lika a best plan for you. Anything pretty new will have at least Python 3.6 by default, as Python 3.5 and older versions are already end of life. On my RPi cat /etc/debian_release
shows 10.6
, it had Python 3.6 by default IIRC.
But have you tried apt-get update
and then apt-get upgrade
? Maybe that will upgrade Python too (but I'm no Debian expert).
But have you tried
apt-get update
and thenapt-get upgrade
? Maybe that will upgrade Python too (but I'm no Debian expert).
Yep, tried that in the beginning and also at later stages (after installing Python manually).
Thx for the input. Looks like re-doing from scratch it is.
I've opened the same question in the Raspibolt repo earlier just to make sure I'm not doing it for nothing, but I guess that's the only option left for now.
Ok, I'm closing this, as I don't see anything more can be done from my side here.
Yep, thanks!
Will update with the results when done, but yeah, can be closed, cheers :)
I found a more elegant solution, which seems to work: updating the Raspbian version from my old "stretch" one to "buster" by this guide: https://pimylifeup.com/upgrade-raspbian-stretch-to-raspbian-buster/
This seems to have installed a newer Python version (3.7) in the right location, and I could proceed with the Joinmarket installation successfully 🎉
Update2: the "more elegant solution" didn't work unfortunately (although JM installed, it wasn't starting properly), and I ended up installing the whole Raspibolt from scratch indeed.
I am trying to install the newest release of JM but hitting the error message
ERROR: Package 'joinmarketbase' requires a different Python: 3.5.3 not in '>=3.6'
after the./install.sh --without-qt
. command.When entering
sudo apt-get install python-virtualenv curl python3-dev python3-pip build-essential automake pkg-config libtool libgmp-dev libltdl-dev libssl-dev libatlas3-base
, it returns that everything is on the newest version already. I also donesudo apt update
andsudo apt full-upgrade
before that.So it seems I need to upgrade my Python somehow. Quick google search returns some guides how to install Python 3.8 on a Raspberry but it looks a bit complicated, so I wanted to seek advice here first if there might be any easier ways to do that. Thank you!
edit: the error message in full (it appears after a while in the installation process, there is a lot happening before that):
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality. Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Obtaining file:///home/bitcoin/joinmarket-clientserver-0.8.0/jmbase (from -r requirements/base.txt (line 1)) ERROR: Package 'joinmarketbase' requires a different Python: 3.5.3 not in '>=3.6'
edit2: my Raspberry is on Raspbian
VERSION="9 (stretch)"
, which as I understand is the version from 2017, so just mentioning it here in case it's relevant... I was wondering if upgrading it might be of any help here?edit3: I ended up installing Python 3.9.0 by this guide, which was successful, but
python3 --version
still shows 3.5.3. As I understand it, I need to update the symlink of python3 somehow, but wasn't able to figure out how to do that