Skip to content

Commit

Permalink
Updated all references to source activate to be `conda activate
Browse files Browse the repository at this point in the history
…` [skip ci]
  • Loading branch information
rrigdon committed Feb 5, 2019
1 parent a0caa28 commit e53d8c2
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 66 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Miniconda*.sh
miniconda*.sh
miniconda*.exe
.pytest_cache/
docs/source/_build
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"restructuredtext.confPath": "${workspaceFolder}/docs/source"
}
7 changes: 6 additions & 1 deletion docs/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Update a package ``conda update --name $ENVIRONMENT_NAME
Update package manager ``conda update conda`` Linux/macOS: ``pip install -U pip`` Win: ``python -m pip install -U pip`` X
Uninstall a package ``conda remove --name $ENVIRONMENT_NAME $PACKAGE_NAME`` ``pip uninstall $PACKAGE_NAME`` X
Create an environment ``conda create --name $ENVIRONMENT_NAME python`` X ``cd $ENV_BASE_DIR; virtualenv $ENVIRONMENT_NAME``
Activate an environment ``source activate $ENVIRONMENT_NAME`` X ``source $ENV_BASE_DIR/$ENVIRONMENT_NAME/bin/activate``
Activate an environment ``conda activate $ENVIRONMENT_NAME``\* X ``source $ENV_BASE_DIR/$ENVIRONMENT_NAME/bin/activate``
Deactivate an environment ``source deactivate`` X ``deactivate``
Search available packages ``conda search $SEARCH_TERM`` ``pip search $SEARCH_TERM`` X
Install package from specific source ``conda install --channel $URL $PACKAGE_NAME`` ``pip install --index-url $URL $PACKAGE_NAME`` X
Expand All @@ -55,6 +55,11 @@ Install Python ``conda install python=x.x``
Update Python ``conda update python``\* X X
===================================== ======================================================== ========================================================================== ========================================================

\* ``conda activate`` only works on conda 4.6 and later versions. For conda versions prior to 4.6, type:

* Windows: ``activate``
* Linux and macOS: ``source activate``

\* ``conda update python`` updates to the most recent in the series, so any Python 2.x would update to the latest 2.x and any Python 3.x to the latest 3.x.

.. Show what files a package has installed ``pip show --files $PACKAGE_NAME`` not possible
Expand Down
8 changes: 4 additions & 4 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ activate/deactivate environment
===============================

Conda commands used to switch or move between installed
environments. The ``activate`` command prepends the path of your
environments. The ``conda activate`` command prepends the path of your
current environment to the PATH environment variable so that you
do not need to type it each time. ``deactivate`` removes it.
Even when an environment is deactivated, you can still execute
Expand All @@ -49,13 +49,13 @@ Anaconda

A downloadable, free, open source, high-performance and optimized
Python and R distribution. Anaconda includes
:ref:`conda <conda-glossary>`, conda build, Python and 100+
:ref:`conda <conda-glossary>`, conda build, Python, and 100+
automatically installed, open source scientific packages and
their dependencies that have been tested to work well together,
including SciPy, NumPy and many others. Use the ``conda install`` command
to easily install 1,000+ popular open source packages
for data science---including advanced and scientific
analytics---from the Anaconda repository. Use the ``conda``
for data science--including advanced and scientific
analytics--from the Anaconda repository. Use the ``conda``
command to install thousands more open source packages.

Because Anaconda is a Python distribution, it can make
Expand Down
55 changes: 34 additions & 21 deletions docs/source/user-guide/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Getting started with conda

Conda is a powerful package manager and environment manager that
you use with command line commands at the Anaconda Prompt for Windows,
or in a Terminal window for macOS or Linux.
or in a terminal window for macOS or Linux.

This 20-minute guide to getting started with conda lets you try out
the major features of conda. You should understand how conda works
Expand Down Expand Up @@ -47,7 +47,7 @@ Starting conda

**Windows**

* From the Start menu, search for and open "Anaconda Prompt".
* From the Start menu, search for and open "Anaconda Prompt."

.. figure:: /img/anaconda-prompt.png
:width: 50%
Expand All @@ -60,15 +60,15 @@ On Windows, all commands below are typed into the Anaconda Prompt window.

**MacOS**

* Open Launchpad, then click the Terminal icon.
* Open Launchpad, then click the terminal icon.

On macOS, all commands below are typed into the Terminal window.
On macOS, all commands below are typed into the terminal window.

**Linux**

* Open a Terminal window.
* Open a terminal window.

On Linux, all commands below are typed into the Terminal window.
On Linux, all commands below are typed into the terminal window.

.. _managing-conda:

Expand All @@ -87,7 +87,7 @@ need to navigate to the Anaconda directory.
EXAMPLE: ``conda 4.4.9``

NOTE: If you get an error message, make sure you closed and re-opened the
Terminal window after installing, or do it now. Then verify that you are logged
terminal window after installing, or do it now. Then verify that you are logged
into the same user account that you used to install Anaconda or Miniconda.

Update conda to the current version. Type the following:
Expand Down Expand Up @@ -121,7 +121,7 @@ Create separate environments to keep your programs isolated from each other.
#. Create a new environment and install a package in it.

We will name the environment ``snowflakes`` and install the package
BioPython. At the Anaconda Prompt or in your Terminal window, type
BioPython. At the Anaconda Prompt or in your terminal window, type
the following:

.. code::
Expand All @@ -139,8 +139,15 @@ Create separate environments to keep your programs isolated from each other.

#. To use, or "activate" the new environment, type the following:

* Windows: ``activate snowflakes``
* Linux and macOS: ``source activate snowflakes``
* Windows: ``conda activate snowflakes``
* Linux and macOS: ``conda activate snowflakes``

NOTE: ``conda activate`` only works on conda 4.6 and later versions.

For conda versions prior to 4.6, type:

* Windows: ``activate snowflakes``
* Linux and macOS: ``source activate snowflakes``

Now that you are in your ``snowflakes`` environment, any conda
commands you type will go to that environment until
Expand All @@ -164,13 +171,16 @@ Create separate environments to keep your programs isolated from each other.
TIP: The active environment is the one with an asterisk (*).

#. Change your current environment back to the default (base):
``conda activate``

* Windows: ``deactivate``
* Linux, macOS: ``source deactivate``
NOTE: For versions prior to conda 4.6, use:

TIP: When the environment is deactivated, its name is no
longer shown in your prompt, and the asterisk (*) returns to base.
To verify, you can repeat the ``conda info --envs`` command.
* Windows: ``activate``
* Linux, macOS: ``source activate``

TIP: When the environment is deactivated, its name is no
longer shown in your prompt, and the asterisk (*) returns to base.
To verify, you can repeat the ``conda info --envs`` command.


.. _managing-python:
Expand Down Expand Up @@ -228,9 +238,12 @@ specify the version of Python that you want.
python --version
#. Deactivate the snakes environment and return to base environment:
``conda activate``

NOTE: For versions prior to conda 4.6, use:

* Windows: ``deactivate``
* Linux, macOS: ``source deactivate``
* Windows: ``activate``
* Linux, macOS: ``source activate``


.. _managing-pkgs:
Expand Down Expand Up @@ -273,7 +286,7 @@ install it.
More information
================

* :doc:`Conda cheat sheet <cheatsheet>`.
* Full documentation--- https://conda.io/docs/ .
* Free community support--- https://groups.google.com/a/anaconda.com/forum/#!forum/anaconda .
* Paid support options--- https://www.anaconda.com/support/ .
* :doc:`Conda cheat sheet <cheatsheet>`
* Full documentation--- https://conda.io/docs/
* Free community support--- https://groups.google.com/a/anaconda.com/forum/#!forum/anaconda
* Paid support options--- https://www.anaconda.com/support/
Loading

0 comments on commit e53d8c2

Please sign in to comment.