mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-13 08:42:21 -05:00
Adds additional instructions for virtual environments
h/t to @xlorepdarkhelm for the suggestions! Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
22
README.md
22
README.md
@@ -144,15 +144,16 @@ _NOTE: This project currently uses the latest `1.4.x release of Terraform._
|
|||||||
|
|
||||||
#### Python Installation
|
#### Python Installation
|
||||||
|
|
||||||
Now we're going to install a tool to help us manage Python versions on our
|
Now we're going to install a tool to help us manage Python versions and
|
||||||
system. First, we'll install [pyenv](https://github.com/pyenv/pyenv) with
|
virtual environments on our system. First, we'll install
|
||||||
Homebrew:
|
[pyenv](https://github.com/pyenv/pyenv) and one of its plugins,
|
||||||
|
[pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv), with Homebrew:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install pyenv
|
brew install pyenv pyenv-virtualenv
|
||||||
```
|
```
|
||||||
|
|
||||||
When that finishes installing, you'll need to make another adjustment in the
|
When these finish installing, you'll need to make another adjustment in the
|
||||||
file that you adjusted for your `$PATH` environment variable and Homebrew's
|
file that you adjusted for your `$PATH` environment variable and Homebrew's
|
||||||
setup. Open the file, and add these lines to it:
|
setup. Open the file, and add these lines to it:
|
||||||
|
|
||||||
@@ -161,6 +162,7 @@ setup. Open the file, and add these lines to it:
|
|||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
|
eval "$(pyenv virtualenv-init -)"
|
||||||
```
|
```
|
||||||
|
|
||||||
Once again, start a new shell session or source the file in your current shell
|
Once again, start a new shell session or source the file in your current shell
|
||||||
@@ -251,13 +253,15 @@ First, clone the respository in the directory of your choosing on your machine:
|
|||||||
git clone git@github.com:GSA/notifications-api.git
|
git clone git@github.com:GSA/notifications-api.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Now go into the project directory (`notifications-api` by default) and set the
|
Now go into the project directory (`notifications-api` by default), create a
|
||||||
local Python version, like this (assumes version Python `3.9.18` is what is
|
virtual environment, and set the local Python version to point to the virtual
|
||||||
installed on your machine):
|
environment (assumes version Python `3.9.18` is what is installed on your
|
||||||
|
machine):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd notifications-api
|
cd notifications-api
|
||||||
pyenv local 3.9.18
|
pyenv virtualenv 3.9.18 notify-api
|
||||||
|
pyenv local notify-api
|
||||||
```
|
```
|
||||||
|
|
||||||
_If you're not sure which version of Python was installed with `pyenv`, you can check by running `pyenv versions` and it'll list everything available currently._
|
_If you're not sure which version of Python was installed with `pyenv`, you can check by running `pyenv versions` and it'll list everything available currently._
|
||||||
|
|||||||
Reference in New Issue
Block a user