Setting up your Python Environment

Pyenv

curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pyenv install 3.9.2
pyenv versions
pyenv global 3.9.2
~/.pyenv/versions/3.9.2/bin/python

Pipenv

pyenv global 3.9.2
pip install pipenv
mkdir my_project
cd my_project
pipenv --python 3.9.2 install
pipenv lock
[dev-packages]
pipenv install --dev
# or
pipenv shell --dev
pipenv lock
[[source]]
#url = "your pypi url for packages"
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pandas = "==0.24.2"
requests = "*"
[requires]
python_version = "3.9"
pipenv sync 
$ pipenv install requests~=1.2
pipenv run python3 my_python_app.py
pipenv shell
pipenv update --outdated
pipenv update
pipenv update pandas
pipenv install -r requirements.txt
pip freeze > requirements.txt

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store