install_py_pcha: Install python module py_pcha and numpy

Description Usage Arguments Value Author(s) Examples

View source: R/utility_functions.R

Description

install_py_pcha is a helper function that installs py_pcha and numpy python modules into conda environment. Unless you have a strong reason please use suggested defaults. Alternatively, use pip install –user py_pcha numpy scipy datetime.

select_conda is a helper function that tells R to use python conda environment created specifically for this package using install_py_pcha. This environment is used by default whe package is loaded. Set options(disable_ParetoTI_envname = TRUE) if you want to use other python installation. Set options(ParetoTI_envname = "other_env_name") if you want to use other conda environment.

Usage

1
2
3
4
install_py_pcha(method = "auto", conda = "auto",
  python_version = "python 3.7.3", envname = "reticulate_PCHA",
  overwrite_env = F, extra_packages = character(0),
  packages = c("pip", "py_pcha", "numpy", "scipy", "datetime"))

Arguments

method

paratemer for py_install. Default option should work in most cases. Use virtualenv if you don't want to install anaconda but virtualenv doesn't work on Windows. For conda method to work anaconda should be installed as described here: https://conda.io/docs/user-guide/install/index.html.

conda

paratemer for py_install. Default option should work in most cases.

python_version

version to be installed into environment that is compatible with py_pcha module.

envname

name of the conda enviroment where PCHA should be installed. If that enviroment doesn't exist it will be created. If it contains incorrect python_version the function will give an error.

overwrite_env

It TRUE overwrites conda environment.

extra_packages

specify python libraries not needed for ParetoTI to work but desirable in the same conda environment

packages

specify python libraries needed for ParetoTI to work. Normally do not need changing. export PYTHONUSERBASE=/some_dir/python_libs/ python -m pip install –user -i https://pypi.python.org/simple -U pip distribute python -m pip install –user -i https://pypi.python.org/simple –upgrade pip setuptools wheel

Value

path to python enviroment with py_pcha module installed

Author(s)

Vitalii Kleshchevnikov

Examples

1
2
3
4
5
6
7
8
## Not run: 
install_py_pcha()
install_py_pcha(extra_packages = c("tensorflow", "pandas", "keras", "h5py",
                                   "geosketch", "pydot", "sklearn", "umap-learn"))

## See for installation details

## End(Not run)

vitkl/ParetoTI documentation built on Feb. 11, 2020, 1:36 a.m.