0xf4b1/hearthstone-linux

craft.sh error arch

mrmittens12344 opened this issue · 2 comments

Hearthstone installation not found

error: externally-managed-environment

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

If you wish to install a non-Arch-packaged Python package,
create a virtual environment using 'python -m venv path/to/venv'.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.

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

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.

I'm not totally sure where to proceed from here. I had been using it for a long time before I had issues updating the game so I decided to reinstall and now it throws this error when I run ./craft.sh

kug1 commented

having the exact same issue

You could change in the script the line with pip install . to pip install . --break-system-packages and it will do the same as before, but it is discouraged since as it says may break the system's python packages.

Another option is to create a virtual environment, activate it, and then run the script, like this:

python -m venv venv
source venv/bin/activate
./craft.sh

And as last method, you could install the needed packages from the distribution, e.g. for ubuntu the following packages should be sufficient:

sudo apt install python3-pycryptodome python3-humanize python3-tabulate python3-tqdm python3-parsimonious python3-bitarray python3-toml

and you need to change the import in keg/armadillo.py from from Crypto.Cipher import Salsa20 to from Cryptodome.Cipher import Salsa2.

Now you can completely remove the setup_keg function call in the script since we no longer need installing something with pip.

Hope it helps :)