Python is a general purpose programming language which is becoming increasingly popular among data analysts and data scientists due to the strength of its core libraries, simple data structures and growing wealth of packages and modules catering to data science, ML and AI.
Zepl provides a Python interpreter with the following popular libraries pre-installed:
Install additional libraries using
%python !pip install [packages]
%python !pip install -q keras import keras
pip command installs packages in the current environment. If another environment is activated, it will install packages in the particular environment activated. Check the next section to create and switch multiple python environments.
If you'd like to install additional environments you can use the
conda interpreter bundled with the Python interpreter. Conda is open an source package and environment management system which enables easy package installation and environment switching.
List your environments
%python.conda env list
Create an environment
%python.conda create --name [ENV_NAME] # or if you want to specify python version (e.g 3.6) %python.conda create --name [ENV_NAME] python=3.6
Activate an environment
%python.conda activate [ENV_NAME]
Deactivate an environment
List installed packages
Install packages (see previous section to install packages via
%python.conda install [PACKAGE1 PACKAGE2 ...] # or if you want to specify an environment name %python.conda install -n [ENV_NAME] [PACKAGE1 PACKAGE2 ...]
%python.conda uninstall [PACKAGE1 PACKAGE2 ...]
You can use IPython commands with the default Python interpreter in Zepl as shown below:
%python # !ls Run a shell command. # Install additional packages !pip install keras # object? Details about the object help? # Time execution of a Python statement or expression %timeit range(1000)