Skip to content

Commit ab820a2

Browse files
dukebodydatapythonista
authored andcommitted
Improve environment setup docs (python-sprints#17)
* Clarify how to activate Anaconda * Correct command to create new anaconda env Taken from: https://pandas.pydata.org/pandas-docs/stable/contributing.html#creating-a-python-environmen
1 parent ecae7ee commit ab820a2

File tree

4 files changed

+16
-23
lines changed

4 files changed

+16
-23
lines changed

pandas/guide/_sources/pandas_setup.rst.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ repository:
5959

6060
* Download and install `Anaconda <https://www.anaconda.com/download/>`_
6161
* Activate conda by one of the next (or equivalent, if you know what you're doing):
62-
| Restart your terminal
63-
| ``. ~/.bashrc``
64-
| ``export PATH="<path-to-anaconda>/bin:$PATH"``
62+
* If you chose to prepend Anaconda to your PATH during install adding it to your ``~/.bashrc``, just restart your terminal.
63+
* Otherwise, run ``export PATH="<path-to-anaconda>/bin:$PATH"`` in your terminal. Keep in mind that it will be active exclusively in the terminal you run this command.
6564
* Create a conda environment:
66-
``conda create -n pandas_dev -f <path-to-pandas>/ci/environment-dev.yaml``
65+
``conda env create -n pandas_dev -f <path-to-pandas>/ci/environment-dev.yaml``
6766
* Activate the new conda environment:
6867
``source activate pandas_dev``
6968
* Install pandas development dependencies:

pandas/guide/pandas_setup.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,35 +85,30 @@ <h3>2. Get the pandas source code<a class="headerlink" href="#get-the-pandas-sou
8585
<h3>3. Set up a Python environment<a class="headerlink" href="#set-up-a-python-environment" title="Permalink to this headline"></a></h3>
8686
<div class="section" id="a-python-environment-with-anaconda">
8787
<h4>3.a Python environment with Anaconda<a class="headerlink" href="#a-python-environment-with-anaconda" title="Permalink to this headline"></a></h4>
88-
<ul>
89-
<li><p class="first">Download and install <a class="reference external" href="https://www.anaconda.com/download/">Anaconda</a></p>
90-
</li>
88+
<ul class="simple">
89+
<li>Download and install <a class="reference external" href="https://www.anaconda.com/download/">Anaconda</a></li>
9190
<li><dl class="first docutils">
9291
<dt>Activate conda by one of the next (or equivalent, if you know what you’re doing):</dt>
93-
<dd><div class="first last line-block">
94-
<div class="line">Restart your terminal</div>
95-
<div class="line"><code class="docutils literal notranslate"><span class="pre">.</span> <span class="pre">~/.bashrc</span></code></div>
96-
<div class="line"><code class="docutils literal notranslate"><span class="pre">export</span> <span class="pre">PATH=&quot;&lt;path-to-anaconda&gt;/bin:$PATH&quot;</span></code></div>
97-
</div>
92+
<dd><ul class="first last">
93+
<li>If you chose to prepend Anaconda to your PATH during install adding it to your <code class="docutils literal notranslate"><span class="pre">~/.bashrc</span></code>, just restart your terminal.</li>
94+
<li>Otherwise, run <code class="docutils literal notranslate"><span class="pre">export</span> <span class="pre">PATH=&quot;&lt;path-to-anaconda&gt;/bin:$PATH&quot;</span></code> in your terminal. Keep in mind that it will be active exclusively in the terminal you run this command.</li>
95+
</ul>
9896
</dd>
9997
</dl>
10098
</li>
10199
<li><dl class="first docutils">
102100
<dt>Create a conda environment:</dt>
103-
<dd><p class="first last"><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">create</span> <span class="pre">-n</span> <span class="pre">pandas_dev</span> <span class="pre">-f</span> <span class="pre">&lt;path-to-pandas&gt;/ci/environment-dev.yaml</span></code></p>
104-
</dd>
101+
<dd><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">env</span> <span class="pre">create</span> <span class="pre">-n</span> <span class="pre">pandas_dev</span> <span class="pre">-f</span> <span class="pre">&lt;path-to-pandas&gt;/ci/environment-dev.yaml</span></code></dd>
105102
</dl>
106103
</li>
107104
<li><dl class="first docutils">
108105
<dt>Activate the new conda environment:</dt>
109-
<dd><p class="first last"><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">activate</span> <span class="pre">pandas_dev</span></code></p>
110-
</dd>
106+
<dd><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">activate</span> <span class="pre">pandas_dev</span></code></dd>
111107
</dl>
112108
</li>
113109
<li><dl class="first docutils">
114110
<dt>Install pandas development dependencies:</dt>
115-
<dd><p class="first last"><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">install</span> <span class="pre">-c</span> <span class="pre">defaults</span> <span class="pre">-c</span> <span class="pre">conda-forge</span> <span class="pre">--file=&lt;pandas-dir&gt;/ci/requirements-optional-conda.txt</span></code></p>
116-
</dd>
111+
<dd><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">install</span> <span class="pre">-c</span> <span class="pre">defaults</span> <span class="pre">-c</span> <span class="pre">conda-forge</span> <span class="pre">--file=&lt;pandas-dir&gt;/ci/requirements-optional-conda.txt</span></code></dd>
117112
</dl>
118113
</li>
119114
</ul>

0 commit comments

Comments
 (0)