The best practice among python development is to use project specific virtual environment so that you can install any packages in isolation from other environments- this reduces any complications that can arise from conflicting package versions.
On VS code use the command palette (shift+ command +P), then type Python: Create Environment, select Venv
Enter your Mac login password if prompted. Terminal won’t display characters while you type it.
When installation finishes, run the commands it prints under “Next steps”. These add Homebrew to your PATH.
—
Command Line Interface (CLI) provides the same core functionality as the console, plus additional commands, like the ability to run scripts which extends the console functionality.
To install CLI, you must have
OCI cloud account
User in a group with the right permissions
A key pair used for signing API requests- public key uploaded at Oracle cloud
To install the CLI on Mac OS with HomeBrew:
brew update && brew install oci-cli
To verify the OCI CLI installation
oci --version
To set up the configuration File- there are two ways to do it;
a) Use the set up config Dialog
oci setup config
this command prompts with the information required to create the configuration file and API keys. After the set up, you should upload the public api key on your the API keys section of your profile on OCI.
b) Manual set up
Log into your Oracle cloud, go to your profile, -> API keys & add an API key
Add an API Key in PEM format or generate an API key pair
Download the private key & save config file details – You will use them to set up the config file.
On your MAC OS, navigate to the .oci folder.
cd ~/.oci
if you don’t have the .oci folder, make the directory
mkdir ~/.oci
Paste the private key downloaded from OCI on this folder and edit the permissions to ensure that only you can read the private key file:
chmod go-rwx ~/.oci/<oci_api_key_name.pem
Create a config file and paste the config file details from OCI.
vi config
The config file content looks similar to this- add yours,