Skip to content

Commit d72e968

Browse files
committed
Add virtualenv setting up session on Contributing
1 parent b73e46d commit d72e968

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

CONTRIBUTING.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,32 @@ $ git push origin [name_of_your_new_branch]
180180

181181

182182
### Setting up for cmd2 development
183-
For doing cmd2 development, it is recommended you create a virutal environment and install the package from the source.
184-
```sh
185-
# Create a new environment for cmd2
186-
$ conda create -n cmd2 python=3.6
183+
For doing cmd2 development, it is recommended you create a virutal environment using Conda or Virtualenv and install the package from the source.
187184

188-
# Activate cmd virtual environment
185+
#### Create a new environment for cmd2 using Conda
186+
```sh
187+
$ conda create -n cmd2_py36 python=3.6
189188
$ source activate cmd2
190189
```
191190

191+
#### Create a new environment for cmd using Virtualenv
192+
We recommend that you use [pyenv](https://github.com/pyenv/pyenv) to manage your installed python versions.
193+
194+
```sh
195+
# Check pyenv versions installed
196+
pyenv versions
197+
198+
# Install python version defined
199+
pyenv install 3.6.3
200+
```
201+
With the Python version installed, you can set the virutalenv properly.
202+
203+
```sh
204+
$ cd ~/src/cmd2
205+
$ virtualenv -p $(pyenv root)/versions/3.6.3/ cmd_py36
206+
$ source ~/src/cmd2/bin/activate
207+
```
208+
192209
Assuming you cloned the repository to `~/src/cmd2` you can install cmd2 in
193210
[editable mode](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs).
194211
Changes to the source code are immediately available when the python interpreter

0 commit comments

Comments
 (0)