Using the Websoft9 ERPNext, you should have some Python administrator like below:



Refer to  HTML version at docs.python-guide.org.


------


#1 Use Pip to intall package


Pip is the package management tool for Python. Because the Python2.x and Python3.x have been installed in this Image, you should known pip is for Python2.x and pip3 is for Python3.x


# view the default python pip version
pip -V
pip 19.0.3 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

# view the python3 pip version
pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

# List installed packages of python3.
pip3 list


#2 Use Pipenv to manage project


Pipenv is a dependency manager for Python projects. If you're familiar with Node.js' npm or Ruby's bundler, it is similar in spirit to those tools. While pip can install Python packages, Pipenv is recommended as it's a higher-level tool that simplifies dependency management for common use cases.


# install pipenv
pip install --user pipenv

# Installing packages for your project
cd myProject
pipenv install requests

# activate enviroment
pipenv shell

# run this script using pipenv run
pipenv run python3 example.py



#3 Configure your HTTP Server


Create HTTP server in python is very convenient, just use Gunicorn or uWSGI.