casualsnek / waydroid_script

Python Script to add OpenGapps, Magisk, libhoudini translation library and libndk translation library to waydroid !
GNU General Public License v3.0
1.53k stars 147 forks source link

Maybe use venv is a better solution #69

Open ghost opened 1 year ago

ghost commented 1 year ago

A fresh installed ubuntu/debain system does not contain pip by default. When run command python3 -m ensurepip --default-pip, it says:

Using pip together with the system python might have unexpected results for any system installed module, so use it on your own risk, or make sure to only use it in virtual environments.

So i tried venv and it works well. Here's how I did.

  1. sudo apt install python3-venv #install python venv module globally
  2. cd waydroid_script && python3 -m venv venv --system-site-packages #create a venv with system's packages
  3. source venv/bin/activate #activate the venv environment
  4. sudo ./venv/bin/python3 -m pip install -r requirements.txt #install required python modules
  5. sudo ./venv/bin/python3 main.py -i/-g/-n/-h/-w

done.

ducanh-le commented 1 year ago

I'm struggling so hard because of new Ubuntu pip problem. But you save my life.

BillFleming commented 1 month ago

FYI I couldn't get the newer venv method to work on pinephone pro with arch. Had to use "sudo python3 main.py install magisk" like usual.