Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian Sid packages #23

Closed
tripplehelix opened this issue Mar 31, 2023 · 12 comments
Closed

Debian Sid packages #23

tripplehelix opened this issue Mar 31, 2023 · 12 comments
Labels
help wanted Extra attention is needed

Comments

@tripplehelix
Copy link

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
Copy link
Owner

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

@tripplehelix
Copy link
Author

"Debian Sid no longer allows installing packages via pip"

@imLinguin
Copy link
Owner

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

@imLinguin imLinguin added the help wanted Extra attention is needed label Apr 2, 2023
@tripplehelix
Copy link
Author

tripplehelix commented Apr 3, 2023

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
Copy link

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

@tripplehelix
Copy link
Author

tripplehelix commented Apr 20, 2023

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
Copy link

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
Copy link
Owner

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
Copy link
Owner

imLinguin commented May 12, 2023

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
Copy link
Author

tripplehelix commented May 12, 2023

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
Copy link

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
Copy link
Owner

Updated the README. Thank you and enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants