imLinguin / nile

Unofficial Amazon Games client
GNU General Public License v3.0
307 stars 16 forks source link

Debian Sid packages #23

Closed tripplehelix closed 1 year ago

tripplehelix commented 1 year ago

Debian Sid no longer allows installing packages via pip, seems the Debian repo's don't contain the correct crypto package.

14:54:48 ▶ sudo apt install python3-pycryptodome python3-requests python3-zstd python3-protobuf

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pycryptodome is already the newest version (3.11.0+dfsg1-4).
python3-requests is already the newest version (2.28.1+dfsg-1).
python3-zstd is already the newest version (1.5.2.5-1+b3).
python3-protobuf is already the newest version (3.21.12-1+b2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

14:55:44 ▶ ./bin/nile auth --login

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/tom/builds/nile/nile/cli.py", line 7, in <module>
    from nile.downloading import manager
  File "/home/tom/builds/nile/nile/downloading/manager.py", line 7, in <module>
    from nile.models import manifest, hash_pairs, patch_manifest
  File "/home/tom/builds/nile/nile/models/manifest.py", line 4, in <module>
    from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'
imLinguin commented 1 year ago

I'm not that experienced with Debian distros, however you may try installing pycyptodome using pip3

tripplehelix commented 1 year ago

"Debian Sid no longer allows installing packages via pip"

imLinguin commented 1 year ago

oh, missed that sorry. I'm not sure what to do here tbh...

tripplehelix commented 1 year ago

Have you tried putting it on https://pypi.org/ ? Would then be able to install it via pipx. Currently the repo is missing required files to do this.

https://packaging.python.org/en/latest/

REtroGeekery commented 1 year ago

Have you tried "sudo apt -y install python3-pycryptodome" in the terminal? That worked for me when I hit this issue.

tripplehelix commented 1 year ago

Have you tried "sudo apt -y install python3-pycryptodome" in the terminal? That worked for me when I hit this issue.

Unfortunately one of the first things I tried was reinstalling all dependencies.

nebadon2025 commented 1 year ago

I am getting the same exact issue in Ubuntu 23.04 now, no longer able to use Nile.. and sadly I have already upgraded all my computers. pip has also stopped working in this version of ubuntu now as well..

imLinguin commented 1 year ago

We found a workaround with @nebadon2025.

For now I recommend using virtual environment and install pip dependencies there

create the environment python3 -m venv env

enter the env source ./env/bin/activate

install deps pip3 install -r requirements.txt

Enjoy!

With this you need to enter env everytime you want to use Nile. Not ideal but allows you to use it while I look for other options 😄

imLinguin commented 1 year ago

Looks like package in Ubuntu and Debian repos is in fact newer pycryptodomex. I added the fallback to use new Cryptodome package in latest commit. Please try it and let me know if that solved it.

EDIT: That should make workaround above obsolete.

tripplehelix commented 1 year ago

Looks like package in Ubuntu and Debian repos is in fact newer pycryptodomex. I added the fallback to use new Cryptodome package in latest commit. Please try it and let me know if that solved it.

EDIT: That should make workaround above obsolete.

That's fixed the crypto package, at least I think so?

Module Crypto not found, trying to use newer Cryptodome
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/tom/builds/nile/nile/cli.py", line 7, in <module>
    from nile.downloading import manager
  File "/home/tom/builds/nile/nile/downloading/manager.py", line 8, in <module>
    from nile.downloading.worker import DownloadWorker
  File "/home/tom/builds/nile/nile/downloading/worker.py", line 6, in <module>
    from nile.models.patcher import Patcher
  File "/home/tom/builds/nile/nile/models/patcher.py", line 4, in <module>
    import zstandard as zstd
ModuleNotFoundError: No module named 'zstandard'

Now complains about the zstandard module.

We have this package in apt as 'Package: zstd Version: 1.5.4+dfsg2-5' or in python3 as 'Package: python3-zstd Version: 1.5.2.5-1+b3' and 'Package: python3-zstandard Version: 0.20.0-3'

python3-zstandard is the important package to get this to work, you don't need either zstd or python3-zstd.

So, dependancies are:

sudo apt install python3-pycryptodome python3-requests python3-zstandard python3-protobuf Runs fine with these changes.

nebadon2025 commented 1 year ago

I also tested this and was missing python3-zstandard as well, installing it allowed nile to run again outside of the env! Thanks so much!!!

imLinguin commented 1 year ago

Updated the README. Thank you and enjoy!