Update Certifai Toolkit
Certifai Toolkit users may follow the process described on this page to upgrade the Toolkit to a new version.
Go to the Certifai Website and in the Certifai Toolkit panel click Download Now to download the latest version of Certifai Toolkit. Verify that this version is not already installed before you begin.
This process provides the least disruption to your local workflow by creating a new context folder in which to unzip the new Certifai version, while maintaining the same conda environment. In this way you can continue to access to reports or scan definitions that you may have stored in your original version folder, but you do not have to manage multiple conda environments.
You may to want to install Certifai in a new conda environment if you have any concerns about a non-backwards compatible change to Certifai, and you would like to keep existing Certifai artifacts. Refer to the changelog for announcements about any such breaking changes.
Upgrade Toolkit
Check to see what version of the Toolkit you are currently using by running
certifai --version
.Download the latest version of toolkit.
The zip package is downloaded to your local drive.
Make a new directory to work in (e.g.
certifai-v1.2.11
). Be sure to give it a name that you have not used to unzip a previous version of Certifai.- Mac/Linux users:mkdir certifai-v1.2.11
- Windows PowerShell users: Be sure to create the directory somewhere that you have access if you are not running PowerShell as an Administrator.md c:\<current-location>\certifai-v1.2.11
- Mac/Linux users:
Unzip the package into the new working directory.
- Mac/Linux users:unzip certifai_toolkit.zip -d certifai-v1.2.11
- Windows PowerShell users
Unzip the files to the directory you created in step 5:NOTE: If you unzipExpand-Archive -LiteralPath certifai_toolkit.zip -DestinationPath certifai-v1.2.11 -Force
certifai_toolkit.zip
into a folder where a version currently exists, the original file will be overwritten automatically. This is NOT recommended.
- Mac/Linux users:
Set your context to the working directory you created, where you unzipped the latest
certifai_toolkit.zip
.cd <folder-where-you-unzipped-certifai_toolkit>Example:
cd certifai-v1.2.11
Info
IMPORTANT: If you are installing a major version upgrade and want to activate a new conda environment, complete the instructions in the section below labled "Activate new conda environment" before continuing.
Otherwise, if you already have an active conda environment running continue with the instructions that follow.
(To enable the use of Jupyter notebooks) Install the base requirements.
conda install --file requirements.txtWARNING
Python 3.6 has reached end-of-life and compatible library versions for running Jupyter notebooks may no longer be found on certain conda channels. If you are using Python 3.6, then we suggest installing the
requirements.txt
file withpip
to avoid an inconsistent python environment:pip install -r requirements.txt
Install the CERTIFAI packages from your upgrade folder.
On MAC or Linux:
Install the CERTIFAI packages compatible with all supported Python versions.
pip install packages/all/*Install python packages for your python version (3.6, 3.7 or 3.8).
pip install packages/[your_python_version]/*EXAMPLE:
MAKE SURE YOU USE YOUR VERSION OF PYTHON. (To check Python version enter
python --version
in your terminal or command prompt.):pip install packages/python3.6/*
For Windows Powershell:
Install the CERTIFAI packages compatible with all supported Python versions.
Get-ChildItem .\packages\all\*.zip | ForEach-Object -Process { pip install $_ }Install the Certifai packages specific to your Python version. You should replace the
python3.6
in the example below with the Python version you are using.Get-ChildItem .\packages\python3.6\*.zip | ForEach-Object -Process { pip install $_ }
Verify that the latest version is installed by running
certifai --version
.Verify that the upgraded Certifai CLI and client libraries are installed successfully.
certifai -hA usage statement is displayed if the Certifai CLI has been installed successfully.
You can now run the Certifai CLI in your conda environment from any Certifai working directory (Certifai version folder).
To begin working with the Certifai CLI, set your context in the desired version's folder before you begin.
Activate new conda environment
When there is a major release, you may decide to activate a new conda environment.
Info
The following steps should be completed between steps 5 and 6 in the process above.
IMPORTANT: The process below OVERWRITES your existing conda environment. If you want to retain that environment, DO NOT complete this process OR complete the process, but provide your new conda environment with a different name from the current one.
Before you create a new conda environment deactivate the conda environment you have been using.
conda deactivateCreate a new Python 3.6, 3.7, or 3.8 virtual environment.
conda create -n certifai python=3.6Activate the newly created environment.
conda activate certifai
Info
IMPORTANT: Return to step 6 in the instructions above to continue the upgrade process.