mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[3.2.3][Docs]Only support venv and virtualenv users (#3351)
* Limit Playlists Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * docs Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * jack Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * update pip Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com> * flame's review Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
parent
ed76454ddb
commit
8514dbe96a
@ -256,7 +256,7 @@ Pyenv is now installed and your system should be configured to run Python 3.8.
|
||||
Creating a Virtual Environment
|
||||
------------------------------
|
||||
|
||||
We **strongly** recommend installing Red into a virtual environment. Don't be scared, it's very
|
||||
We require installing Red into a virtual environment. Don't be scared, it's very
|
||||
straightforward. See the section `installing-in-virtual-environment`.
|
||||
|
||||
.. _installing-red-linux-mac:
|
||||
@ -267,29 +267,19 @@ Installing Red
|
||||
|
||||
Choose one of the following commands to install Red.
|
||||
|
||||
.. note::
|
||||
|
||||
If you're not inside an activated virtual environment, include the ``--user`` flag with all
|
||||
``python3.8 -m pip install`` commands, like this:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
python3.8 -m pip install --user -U setuptools wheel
|
||||
python3.8 -m pip install --user -U Red-DiscordBot
|
||||
|
||||
To install without additional config backend support:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
python3.8 -m pip install -U setuptools wheel
|
||||
python3.8 -m pip install -U Red-DiscordBot
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U Red-DiscordBot
|
||||
|
||||
Or, to install with PostgreSQL support:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
python3.8 -m pip install -U setuptools wheel
|
||||
python3.8 -m pip install -U Red-DiscordBot[postgres]
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U Red-DiscordBot[postgres]
|
||||
|
||||
|
||||
--------------------------
|
||||
|
||||
@ -64,6 +64,13 @@ Manually installing dependencies
|
||||
|
||||
.. _installing-red-windows:
|
||||
|
||||
------------------------------
|
||||
Creating a Virtual Environment
|
||||
------------------------------
|
||||
|
||||
We require installing Red into a virtual environment. Don't be scared, it's very
|
||||
straightforward. See the section `installing-in-virtual-environment`.
|
||||
|
||||
--------------
|
||||
Installing Red
|
||||
--------------
|
||||
@ -72,31 +79,20 @@ Installing Red
|
||||
for the PATH changes to take effect.
|
||||
|
||||
1. Open a command prompt (open Start, search for "command prompt", then click it)
|
||||
2. Create and activate a virtual environment (strongly recommended), see the section `using-venv`
|
||||
3. Run **one** of the following commands, depending on what extras you want installed
|
||||
|
||||
.. note::
|
||||
|
||||
If you're not inside an activated virtual environment, use ``py -3.8`` in place of
|
||||
``python``, and include the ``--user`` flag with all ``pip install`` commands, like this:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
py -3.8 -m pip install --user -U setuptools wheel
|
||||
py -3.8 -m pip install --user -U Red-DiscordBot
|
||||
2. Run **one** of the following set of commands, depending on what extras you want installed
|
||||
|
||||
* Normal installation:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
python -m pip install -U setuptools wheel
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U Red-DiscordBot
|
||||
|
||||
* With PostgreSQL support:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
python -m pip install -U setuptools wheel
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U Red-DiscordBot[postgres]
|
||||
|
||||
|
||||
|
||||
@ -9,14 +9,9 @@ problems. Firstly, simply choose how you'd like to create your virtual environme
|
||||
* :ref:`using-venv` (quick and easy, involves two commands)
|
||||
* :ref:`using-pyenv-virtualenv` (recommended if you installed Python with pyenv)
|
||||
|
||||
**Why Should I Use a Virtual Environment?**
|
||||
|
||||
90% of the installation and setup issues raised in our support channels are resolved when the user
|
||||
creates a virtual environment.
|
||||
|
||||
**What Are Virtual Environments For?**
|
||||
|
||||
Virtual environments allow you to isolate red's library dependencies, cog dependencies and python
|
||||
Virtual environments allow you to isolate Red's library dependencies, cog dependencies and python
|
||||
binaries from the rest of your system. It also makes sure Red and its dependencies are installed to
|
||||
a predictable location. It makes uninstalling Red as simple as removing a single folder, without
|
||||
worrying about losing your data or other things on your system becoming broken.
|
||||
@ -31,18 +26,18 @@ python.
|
||||
|
||||
First, choose a directory where you would like to create your virtual environment. It's a good idea
|
||||
to keep it in a location which is easy to type out the path to. From now, we'll call it
|
||||
``redenv``.
|
||||
``redenv`` and it will be located in your home directory.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``venv`` on Linux or Mac
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Create your virtual environment with the following command::
|
||||
|
||||
python3.8 -m venv redenv
|
||||
python3.8 -m venv ~/redenv
|
||||
|
||||
And activate it with the following command::
|
||||
|
||||
source redenv/bin/activate
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
.. important::
|
||||
|
||||
@ -56,11 +51,11 @@ Continue reading `below <after-activating-virtual-environment>`.
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
Create your virtual environment with the following command::
|
||||
|
||||
py -3.8 -m venv redenv
|
||||
py -3.8 -m venv %userprofile%\redenv
|
||||
|
||||
And activate it with the following command::
|
||||
|
||||
redenv\Scripts\activate.bat
|
||||
%userprofile%\redenv\Scripts\activate.bat
|
||||
|
||||
.. important::
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user