Pip Installation Error
Issues with missing packages
When we run python3 v7-workspace.py for dataset registration, we may encounter error saying certain packages are missing. If so, install the required packages using pip:
chands30@chands30-06L1C2 ~ % python3 v7-workspace.py
Traceback (most recent call last):
File "/Users/chands30/v7-workspace.py", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
chands30@chands30-06L1C2 ~ %
Install the required packages using pip:
pip install requests
Once the packages are installed, run the dataset registration script again.
python3 <v7-dataset-registration-script>.py
Issues with installing pip packages
While installing the required packages, you may encounter the following error, due to the environment being externally managed. If so, create a python virtual environment (venv) and install the required packages in the virtual environment.
pip install requests
error: externally-managed-environment
× This environment is externally managed
....
In this case, create a virtual environment and install the required packages in the virtual environment.
python3 -m venv <v7-env>
This would create a virtual environment named <v7-env>. Activate the virtual environment and install the required packages in the virtual environment.
source <v7-env>/bin/activate
pip install requests
Once the packages are installed, run the dataset registration script in the virtual environment.
python3 <v7-dataset-registration-script>.py
Issue with certificate verification in virtual environment
While running the dataset registration script from the virtual environment, we may encounter the following error, due to the SSL certificate verification issues as the script is running in the virtual environment but the Roche network or VPN uses an SSL decryption proxy that injects a self-signed certificate into the SSL chain. Python’s built-in root certificate store does not include this self-signed certificate, so the SSL verification fails. If so, follow the steps below:
pip install pip-system-certs
This package patches Python’s requests library to use your macOS system keychain, which already trusts our network certificates.
Once the packages are installed, run the dataset registration scrip
python3 <v7-dataset-registration-script>.py
|
If you are running the dataset registration script in a virtual environment, you can deactivate the virtual environment by running |
deactivate