Page 1 of 1

Re: SABYenc module... NOT found! Expecting v3.3.1 [QNAP]

Posted: September 8th, 2020, 2:43 am
by pinn
sander wrote: September 30th, 2017, 7:13 am Good that it works.

Regarding this subject (more than one python installation on a system), this might be relevant for installing sabyenc via pip into the correct python installation:

Code: Select all

/path/to/python2.{5,6} /path/to/pip install PackageName
or more general:

Code: Select all

/path/to/python /path/to/pip install PackageName
... with "/path/to/python" the python that is used by SABnzbd (check the log)

I have a system with two python2 versions, and specifying the python-path indeed worked:

The default python:

Code: Select all

sudo /usr/bin/python /usr/local/bin/pip install sabyenc
/usr/bin/python -c "import sabyenc ; print sabyenc.__version__ "
The python 2.7.11 did not yet have pip itself, so:

Code: Select all

wget https://bootstrap.pypa.io/get-pip.py
sudo /usr/bin/python2711  get-pip.py
sudo /usr/bin/python2711 /usr/local/bin/pip install sabyenc
/usr/bin/python2711 -c "import sabyenc ; print sabyenc.__version__ " 
... and that worked too! :)

So: before you install sabyenc, find out which exact python is used (full path), and use that to install sabyenc.

I'll put this in the wiki documentation.
Hi Sander,

I think this will help resolve the issue I am facing when trying to install req.txt as the installation is defaulting to python3.5 and not 3.8 which I want to use.
I am having an issue with the syntax. 3.8 is installed in sudo /usr/local/bin/python3.8 and I need to install cheetah but this doesn't work: sudo /usr/local/bin/python3.8 /usr/local/bin/pip install cheetah

Re: SABYenc module... NOT found! Expecting v3.3.1 [QNAP]

Posted: September 8th, 2020, 2:53 am
by sander
How about

sudo /usr/local/bin/python3.8 -m pip install cheetah

Re: SABYenc module... NOT found! Expecting v3.3.1 [QNAP]

Posted: September 8th, 2020, 3:17 am
by pinn
Yep that works but gives the same error that I had when using req.txt

Code: Select all

osmc@HTPC:~/sabnzbd$ sudo /usr/local/bin/python3.8 -m pip install cheetah
Collecting cheetah
  Using cached Cheetah-2.4.4.tar.gz (190 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qf4_k27n/cheetah/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qf4_k27n/cheetah/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-y_czbk5x
         cwd: /tmp/pip-install-qf4_k27n/cheetah/
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qf4_k27n/cheetah/setup.py", line 10, in <module>
        import SetupTools
      File "/tmp/pip-install-qf4_k27n/cheetah/SetupTools.py", line 50
        except DistutilsPlatformError, x:
                                     ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the '/usr/local/bin/python3.8 -m pip install --upgrade pip' command.

Re: SABYenc module... NOT found! Expecting v3.3.1 [QNAP]

Posted: September 8th, 2020, 3:19 am
by safihre
sudo /usr/local/bin/python3.8 -m pip install -r requirements.txt

Re: SABYenc module... NOT found! Expecting v3.3.1 [QNAP]

Posted: September 8th, 2020, 3:34 am
by pinn
safihre wrote: September 8th, 2020, 3:19 am sudo /usr/local/bin/python3.8 -m pip install -r requirements.txt
Throws an error: https://pastebin.com/9aZ77kuS


Failed to build sabyenc3 cheetah3 cryptography cffi
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

SABYenc module... NOT found! Expecting v3.3.1 [Debian 9]

Posted: September 8th, 2020, 3:42 am
by safihre
Are you actually on QNAP as the name of this topic suggests?
Because then you should use the Sherpa script that handles all of this for you.

Re: SABYenc module... NOT found! Expecting v3.3.1 [QNAP]

Posted: September 8th, 2020, 3:45 am
by pinn
safihre wrote: September 8th, 2020, 3:42 am Are you actually on QNAP as the name of this topic suggests?
Because then you should use the Sherpa script that handles all of this for you.
SOrry, should have said, this is Debian 9