Package Installation
Dependencies
The Python connectors have only one requirement: an existing Python version 3.8, 3.9, 3.10, or 3.11 distribution. Other version 3 distributions might need to create a virtual environment to accommodate the version dependency.
Installation
The CData Python Connector for HDFS setup ZIP contains versions of the connector for Windows, Mac, and Linux.Python versions 3.8, 3.9, 3.10, and 3.11 are supported.
For Windows environments, use the whl file of the appropriate Python version and bitness with the "pip install" command. For example, once your command prompt is in the pertinent directory, the following command is appropriate for a 64-bit Python 3.8 distribution on a Windows environment, after the version number has been adjusted accordingly:
pip install cdata_hdfs_connector-23.0.8572-cp38-cp38-win_amd64.whl
For Linux or Mac environments, the package is a tar.gz file instead. Once again, the "pip install" command is used via the terminal. For example, the following command is appropriate to install the connector for a Python 3.8 distribution in a Linux environment, after the version number has been adjusted accordingly:
pip install cdata-hdfs-connector-23.0.xxxx-python3.tar.gz
Regardless of the environment, certain distributions might require that the "pip3 install" command be used instead, to differentiate from a Python 2 distribution that might exist already. After installation, confirm whether the connector is successfully installed by running the "pip list" command. If "cdata-hdfs-connector" is present in the list output by the command, then the installation was successful.
Licensing
After the installation is complete, a separate step is needed to activate a license for the connector. Among the CData assets in the distribution's site packages, there is an install-license tool that activates this license. From within the distribution's site-packages folder, after navigating to the "cdata/installlic_hdfs" folder, simply use a command like the below to activate the license. Omitting the <key> argument activates a trial license:
- Windows:
./install-license.exe <key>
- Linux / Mac:
./install-license.sh <key>
Uninstallation
If the connector needs to be uninstalled for any reason, do so by running the pip uninstall command, as in the example below:
pip uninstall cdata-hdfs-connector