Dinones / Nintendo-Switch-Pokemon-Shiny-Hunter

Search for shiny pokémon on your Nintendo Switch while sleeping!
Other
78 stars 4 forks source link

Having trouble installing -r Requirements.txt #16

Closed sherret2 closed 3 weeks ago

sherret2 commented 3 weeks ago

Whenever I try to install -r Requirements.txt I get the error: error: externally-managed-environment. What am I doing wrong and how do I fix?

Dinones commented 3 weeks ago

Thank you for reporting the issue! May I ask you some questions:

  1. What operating system are you using?
  2. Did you follow the installation guide for the VM step by step?
sherret2 commented 3 weeks ago

Currently using Xubuntu and followed the installation guide. su && nano /etc/sudoers did not bring up the menu shown when attempted. It only changed (username)@(username)-Virtual Box to root@(username)-Virtual Box

Dinones commented 3 weeks ago

I think that's the point where you got the issue. Please try undoing that change and going back to your previous username (or better reinstall the VM to fully revert the changes). Then, instead of running su && nano /etc/sudoers run the commands in separated lines:

su

and then:

nano /etc/sudoers
sherret2 commented 3 weeks ago

Ok, that does explain the problems I had before. Let me reinstall the VM and try this from scratch.

Dinones commented 3 weeks ago

I have uploaded an updated version of the instructions. Please make sure you are following the latest version of the instructions.

sherret2 commented 3 weeks ago

Ok, my username is now in /etc/sudoers alongside root. Attempted to install -r Requirements.txt again and was met with another externally-managed-environment error.

Dinones commented 3 weeks ago

Can you please paste me the error you are getting, as well as a screenshot of the terminal when executing the installation program?

sherret2 commented 3 weeks ago

error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. Screenshot_2024-08-21_14-26-49

Dinones commented 3 weeks ago
  1. May I ask you what's the ISO you downloaded for the VM? Did you download it from the web of the instructions?

    image

  2. Does it work if you run instead:

    sudo pip install --break-system-packages -r Requirements.txt && pip install --break-system-packages -r Requirements.txt
sherret2 commented 3 weeks ago

Looked closer at the one I downloaded, apparently I got 20.04 not 20.04.6. Don't even know how I managed to do that. Welp I'll come back if if still doesn't work after grabbing the correct iso file.

Dinones commented 3 weeks ago

Perfect! Tell me if the issue is solved after downloading the correct one.

sherret2 commented 3 weeks ago

Sorry it took a while to comment back. Had some other issues that were completely on my end. Program's running perfectly now!