Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md to add step for installation of requirements.txt #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarkTripod-Duo
Copy link

Description

Add pip installation step for requirements.txt to the README instructions

Motivation and Context

The explicit step to install the required python packages prior to execution of setup.py is needed to prevent potential installation errors that may occur when required packages call setuputils on their own.

How Has This Been Tested?

Manual testing of installation steps performed in a virtual environment.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Copy link
Contributor

@ceckim ceckim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend adding instructions for setting up a virtual env:

Option 1: Use virtualenv

curl https://pyenv.run | bash

# Delete existing .pyenv if necessary
rm -rf ~/.pyenv

# Add stuff to your shell config
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc

# Install the desired python version
pyenv install 3.10.8

# Verify installation - this lists all installed versions & virtual envs for python
pyenv versions

# Create your virtual environment for python
# cd <your-project-folder>
# pyenv virtualenv <python version> <virtual env name>
cd ~/projects/duo_splunkapp
pyenv virtualenv 3.10.8 myProject310

# Install dependencies for your python project
pip install -r ../../bin/requirements.txt

# To activate a virtualenv
pyenv activate myProject310

# To de-activate the currently active virtualenv
pyenv deactivate

Option 2: Use venv

$ cd ~/src/duo_splunkapp
$ python3.7 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r bin/test-requirements.txt
(venv) $ make setup

README.md Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants