Repository navigation
Closed
Labels
External bug 🐞For bugs which are not caused by DietPi.Solution available 🥂Definite solution has been done
Milestone
Description
Creating a bug report/issue
Required Information
- DietPi version 6.28
- Distro version buster
- Kernel version Linux DietPi 4.19.75-v7l+ DietPi-System | Quirks noticed by v158 image update #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
- SBC device RPi 4 Model B (armv7l)
- Power supply used CanaKit 5.1V USB Power Supply
- SDcard used Sandisk Ultra
Additional Information (if applicable)
- Software title SABnzbd
- Was the software title installed freshly or updated/migrated? freshly
- Can this issue be replicated on a fresh installation of DietPi? yes, the DietPi install was also fresh
Steps to reproduce
- Use dietpi-software to install SABnzbd
Expected behaviour
- SABnzbd should install and configure
Actual behaviour
- The install seems to be using deprecated python 2.7.16 instead of 3.7. Both 2.7 and 3.7 directories are in /usr/local/lib. This results in the following error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-fYGRQm/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
cwd: None
Complete output (5 lines):
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
Collecting setuptools>=40.6.0
Using cached https://www.piwheels.org/simple/setuptools/setuptools-45.0.0-py2.py3-none-any.whl
ERROR: Package 'setuptools' requires a different Python: 2.7.16 not in '>=3.5'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python /usr/local/lib/python2.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-fYGRQm/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
Extra details
- I've tried dietpi-update 1 and then reinstalling SABnzbd. It results in the same error and then hangs at the following prompt:
DietPi-Software
─────────────────────────────────────────────────────
Mode: Configuring SABnzbd: nzb download manager
[ INFO ] DietPi-Software | Generating initial config, please wait...
The SABnzbd service also shows a status of FAILED, and it won't start, most likely due to the initial install failure.
Metadata
Metadata
Assignees
Labels
External bug 🐞For bugs which are not caused by DietPi.Solution available 🥂Definite solution has been done
Activity
tanderson1992 commentedon Jan 17, 2020
In case it helps:
MichaIng commentedon Jan 17, 2020
@tanderson1992
Many thanks for your report. I just rechecked the documentation and found that SABnzbd does not support Python3: https://sabnzbd.org/wiki/installation/install-off-modules
The error is that for a strange reason the setuptools package pulled by Python2
pipcommand has a dependency on Python3. For Python3 there is actually a different commandpip3, while modules installed withpipmust of course always depend on Python2. So this is a pip repo bug. I'll check if I can replicate this on Debian Buster.tanderson1992 commentedon Jan 17, 2020
Good to know, thank you for checking it out so quickly.
MichaIng commentedon Jan 17, 2020
@tanderson1992
Hmm it succeeds on x86_64 Buster:
Installing Python Pipblock.In the
Installing SABnzbdblock its:Hence no other setuptools is pulled, as 44.0.0 has been installed before.
Could you paste your two blocks? In your case its somehow pulling setuptools 45.0.0 (not available in my case) as a dependency, which is as well different in my case. On ARM and x86_64 things are can be different, since on ARM most modules need to be compiled.
As a quick fix, actually the following should work:
The APT package ships v40.8.0, hence pip does not need to pull any other version.
tanderson1992 commentedon Jan 19, 2020
Here's the pip install:
And here's sabnzbd (after sucessfully installing unrar):
At the end, part of the system shows that sabnzbd is installed (shows up in services, every install starts with "[ OK ] DietPi-Services | stop : sabnzbd" even though the service isn't running. Part of the system thinks it's not installed (for example, if I run re-install 139 it says 139 wasn't already installed).
tanderson1992 commentedon Jan 19, 2020
I ran the two commands you specified above. As I mentioned, the system doesn't think sabnzbd was installed, so it informed me it couldn't re-install it. I used the standard install command after successfully running
apt install python-setuptoolsbut it failed with the same error.Joulinar commentedon Jan 19, 2020
not sure if this is relevant but it seems using cached files on the installation run of @tanderson1992
This was not the case on the run @MichaIng did
tanderson1992 commentedon Jan 19, 2020
I think it's using cached files because I attempted the download multiple times, and those files were already available. It seems like sometimes it re-downloads files (install.py, for example) while others it uses the cache. I haven't used an apt system in ages. Would deleting the cache and trying to install again make a difference?
MichaIng commentedon Jan 19, 2020
@tanderson1992
Jep, makes sense that it uses the cache, but probably there was indeed some broken upload temporarily.
Please try the following (as root):
MichaIng commentedon Jan 19, 2020
Tested again on RPi, result is exactly the same as on VM:
Requirement already satisfied: setuptools>=36"tanderson1992 commentedon Jan 20, 2020
That and a fresh install of sabnzbd looks like it worked fine. Thank you again for looking over this. I'm not sure why it failed on my fresh install but works well for you on RPi.
MichaIng commentedon Jan 20, 2020
As said, my guess is a temporary wrong or faulty upload/state of the pip repository that has been fixed until I ran the install tests. The pip cache then conserved this faulty module.
9 remaining items
MichaIng commentedon Mar 10, 2020
@Joulinar
Of course any Python2 module must not depend on Python3, this matches the original bug of this issue. Not sure currently where this can be reported, in case the bug is present already for too long 🤔.
MichaIng commentedon Mar 10, 2020
And btw in my case again it pulls correct Markdown 3.1.1 automatically:
So might the bug again be solved already?
Joulinar commentedon Mar 10, 2020
@MichaIng
I was facing different scenarios on my VM as well as on my RPi. Will do some test again by resetting both systems.
Joulinar commentedon Mar 10, 2020
@MichaIng
Yep both installations are behaving complete different. Probably due to platform architecture.
Buster VM:
Buster RPi3B+
MichaIng commentedon Mar 10, 2020
@Joulinar
Ah, https://www.piwheels.org/ is a repo which provides wheels for RPi in particular, but: https://www.piwheels.org/faq.html
So this must not be used by Python2...
Could you try:
MichaIng commentedon Mar 10, 2020
Bug reported to pypa: pypa/pip#7842
@Joulinar
Just recognised in your output on RPi:
That https://www.piwheels.org/simple is inside the indexes while Python version is 2.X is the core of the issue, as well with
setuptoolsat top of this thread. As long as this is the case, such kind of failures can happen randomly whenever piwheels has a certain pre-compiled wheel update. Hopefully it is possible to include/exclude indexes based on underlying Python version, lets see what pypa guys come up with.[-]DietPi-Software | pip2 fails due to dependency tail on Python3[/-][+]DietPi-Software | pip2 pulls wheels from Python3-only repo[/+]MichaIng commentedon Mar 10, 2020
Not a new issue, known to pywheels.org maintainers already: piwheels/piwheels#208
Let's hope they get those Python version flags included soon.
MichaIng commentedon Mar 11, 2020
The wheels for newest Markdown have been removed from piwheels repo, which should resolve the issue. I'll run some test on RPi later to verify. So basically there is another layer to mark/derive wheels compatibility, i.e. the
py2.py3in file name, indicating Python2+3 compatibility (which is wrong for newest Markdown version): Python-Markdown/markdown#919