Installation
This guide explains how to install the Purview Unified SDK and verify that it is working correctly.
Prerequisites
Before installing the SDK, ensure that you have:
- Python 3.10 or later
- pip (Python package manager)
You can verify your Python installation by running:
python --version
Install the SDK
Install the latest release from the Python Package Index (PyPI):
pip install purview-unified-sdk
Verify the Installation
After installation, verify that the SDK can be imported successfully.
Start a Python interpreter:
python
Then run:
from purview import PurviewClient, PurviewConfig
print(PurviewClient)
print(PurviewConfig)
If the installation was successful, you should see output similar to:
<class 'purview.client.PurviewClient'>
<class 'purview.config.PurviewConfig'>
This confirms that the SDK has been installed correctly and is ready to use.
Note
The PyPI distribution name is
purview-unified-sdk, while the Python import namespace ispurview.
Using a Virtual Environment
Using a virtual environment is recommended, especially when developing Python applications or working in enterprise environments.
Create a virtual environment:
python -m venv .venv
Activate the virtual environment.
Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
Windows (Command Prompt)
.venv\Scripts\activate.bat
Linux / macOS
source .venv/bin/activate
Then install the SDK:
pip install purview-unified-sdk
Troubleshooting
pip is not recognized
If you receive an error similar to:
'pip' is not recognized as an internal or external command
Ensure that Python and pip are installed correctly.
You can also install the SDK using:
python -m pip install purview-unified-sdk
Unsupported Python Version
If you receive an error similar to:
ERROR: Package 'purview-unified-sdk' requires a different Python version
Verify that you are using Python 3.10 or later.
Check your Python version:
python --version
Package Not Found
If pip cannot locate the package:
ERROR: No matching distribution found for purview-unified-sdk
Upgrade pip and try again:
python -m pip install --upgrade pip
python -m pip install purview-unified-sdk
Import Errors
If installation succeeds but importing the SDK fails, verify that you are using the correct import statement.
Correct:
from purview import PurviewClient, PurviewConfig
Note
Install the SDK using:
pip install purview-unified-sdkbut import it using the
purviewnamespace.
Network or SSL Errors
In some corporate environments, package installation may fail because of network restrictions, proxy servers, firewalls, or SSL inspection.
You may encounter errors similar to:
Connection timed out
SSL certificate verify failed
Failed to establish a new connection
If this occurs:
- Verify that your internet connection is available.
- If you are connected to a corporate network, consult your IT administrator regarding proxy or firewall settings.
- If possible, try installing the package from a different network to determine whether the issue is environment-specific.
Note
These errors are related to the network environment rather than the SDK itself.
Next Steps
Once the SDK has been installed successfully, continue with the Authentication guide to configure Microsoft Entra ID authentication.
➡️ Next: Authentication