Skip to content

Latest commit

 

History

History
102 lines (72 loc) · 1.51 KB

README.md

File metadata and controls

102 lines (72 loc) · 1.51 KB

Python 3 Pure Starter Template with Pipenv (Project Dependencies Manager)

1. Setting up Python before launching the project:

Install "Python Version Manager" (pyenv):

curl https://pyenv.run | bash
# add this commands:
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# here:
nano ~/.bash_profile
# here:
nano ~/.profile
# and here:
nano ~/.bashrc
# then add this commands:
eval "$(pyenv virtualenv-init -)"
# here:
nano ~/.bashrc

Restart terminal and install Python LTS:

pyenv install 3.12.0
pyenv global 3.12.0

Check Python version:

python3 --version

Upgrade PIP manager to latest version [maybe with sudo]:

pip install --upgrade pip

2. Install the package manager and run the project:

Install Project Dependencies Manager (pipenv) [maybe with sudo]:

pip install --user pipenv

Run the project using Pipfile script "dev":

pipenv run dev

To install new packages with pipenv:

pipenv install [package_name]

To install all packages from Pipfile:

pipenv install

If you want to share your code with someone, but make it unreadable:

1. Obfuscate using https://pyob.oxyry.com:

2. Compile using:

python3 -OO -m py_compile [your_file_name].py

3. Run:

python3 __pycache__/[your_file_name].pyc