mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 01:42:30 -05:00
Make some dependency changes, support Python 3.10 and 3.11 (#5611)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -21,18 +21,3 @@ to keep it in a location which is easy to type out the path to. From now, we'll
|
||||
``redenv`` and it will be located in your home directory.
|
||||
|
||||
Create your virtual environment with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.9 -m venv ~/redenv
|
||||
|
||||
And activate it with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
.. important::
|
||||
|
||||
You must activate the virtual environment with the above command every time you open a new
|
||||
shell to run, install or update Red.
|
||||
@@ -0,0 +1,10 @@
|
||||
And activate it with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
.. important::
|
||||
|
||||
You must activate the virtual environment with the above command every time you open a new
|
||||
shell to run, install or update Red.
|
||||
@@ -0,0 +1,7 @@
|
||||
.. include:: _includes/_create-env-with-venv-intro.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.10 -m venv ~/redenv
|
||||
|
||||
.. include:: _includes/_create-env-with-venv-outro.rst
|
||||
@@ -0,0 +1,7 @@
|
||||
.. include:: _includes/_create-env-with-venv-intro.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.11 -m venv ~/redenv
|
||||
|
||||
.. include:: _includes/_create-env-with-venv-outro.rst
|
||||
@@ -0,0 +1,7 @@
|
||||
.. include:: _includes/_create-env-with-venv-intro.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.9 -m venv ~/redenv
|
||||
|
||||
.. include:: _includes/_create-env-with-venv-outro.rst
|
||||
@@ -13,7 +13,7 @@ Install them with dnf:
|
||||
|
||||
sudo dnf -y update
|
||||
sudo dnf -y group install development
|
||||
sudo dnf -y install python39 python39-pip python39-devel java-11-openjdk-headless nano git
|
||||
sudo dnf -y install python39 python39-devel java-11-openjdk-headless nano git
|
||||
|
||||
Set ``java`` executable to point to Java 11:
|
||||
|
||||
@@ -23,6 +23,6 @@ Set ``java`` executable to point to Java 11:
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -11,10 +11,10 @@ Install them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python39 git java-11-openjdk-headless @development nano
|
||||
sudo dnf -y install python39 python3-devel git java-11-openjdk-headless @development nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
|
||||
On distributions where Python 3.11 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
@@ -10,7 +10,7 @@ virtual environment.
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.9 -v
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.11.1 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
@@ -22,6 +22,6 @@ After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.9.9
|
||||
pyenv global 3.11.1
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.9.
|
||||
Pyenv is now installed and your system should be configured to run Python 3.11.
|
||||
|
||||
27
docs/install_guides/_includes/install-python310-pyenv.rst
Normal file
27
docs/install_guides/_includes/install-python310-pyenv.rst
Normal file
@@ -0,0 +1,27 @@
|
||||
----------------------------
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.10 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.10.9 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||
slower.
|
||||
|
||||
After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.10.9
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.10.
|
||||
@@ -2,7 +2,7 @@
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.8 needs to be compiled from source, we recommend the use of pyenv.
|
||||
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
@@ -10,7 +10,7 @@ virtual environment.
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.12 -v
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.16 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
@@ -22,6 +22,6 @@ After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.8.12
|
||||
pyenv global 3.9.16
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.8.
|
||||
Pyenv is now installed and your system should be configured to run Python 3.9.
|
||||
Reference in New Issue
Block a user