Skip to content

Conversation

@kipje13
Copy link
Contributor

@kipje13 kipje13 commented Dec 26, 2019

Pip is not supposed to be imported. The recommended method is to call pip as a subprocess, see https://pip.pypa.io/en/latest/user_guide/#using-pip-from-your-program

I have decided to use subprocess.call over subprocess.check_call because the latter throws an exception when a package fails to install. The rlbottraining package fails to install if the python version is below 3.7 but is not required to succesfully run rlbot.

@tarehart
Copy link
Contributor

This will make things more robust, great! I typed up a long concern about finding the wrong pip on the system path, but then I finally noticed you're using sys.executable, "-m", "pip", that's clever :)

Because of that, I'm sure this will work even for people on Linux/Mac who run python3 run.py so I'm happy.

@kipje13 kipje13 merged commit 9d62b22 into RLBot:master Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants