Python has a large number of dependent packages for use. To simplify the use of the Python environment and dependent packages in SuperMap iDesktopX, MiniConda's package manager system is integrated. You can easily install or update dependent packages, and create and manage Python environments through MiniConda's visual interaction.
Python version
The SuperMap iDesktopX package integrates Python version 3.7, allowing users to use Python from the package without additional installation. Python has evolved to the present day and is available in many versions, the most common being 2.x and 3.x. iDesktopX integrates with the more compatible version 3.7. If other versions of Python are installed, users can also manage and switch through MiniConda in iDesktopX. After switching the Python environment, restart Python to use the specified Python environment. Note: Code can only be executed in one of the Python environments.
Python environment management
The package manager provided in SuperMap iDesktopX can be used to directly use the functions provided by MiniConda without exiting SuperMap iDesktopX, click the Python Environment Management button, Pop-up dialogs provide functions such as adding, creating, deleting, importing, and exporting Python environments.
Create New Environment
In the Python environment management dialog box, click the Create New Environment button. Specify the Python version number, environment Save path, and conda. Exe path in the pop-up dialog box. Click OK to create a new Python environment.
Add Exist Environment
In the Python Environment Management dialog box, click the Add Exist Environment button, specify the path of the Python. Exe and conda. Exe in the pop-up dialog box, and click the OK button to add the specified Python environment.
Remove the environment
In the Python Environment Management dialog list, select the environment to be removed and click the Remove button to remove it.
Create a new enviroment from a template
Click the Create a new enviroment from a template button and select the specified Template File (*.yml) to automatically Add Layout Template the dependent packages and libraries recorded in the file when creating the environment. Avoid manual installation by users and facilitate replication of the environment.
Export Template
Click the Export Template button to export the current environment as a template (*.yml file) for easy copying of the environment. A Python environment identical to the template can be created based on the Template File.
Restart/stop Python
Select the specified environment in the list of the Python Environment Management dialog box, and the selected Python environment will be restarted automatically. You can also set it manually through the Terminate and Restart buttons.
Dependent package management
SupperMap iDesktopX enables the management of dependent packages through MiniConda, making it easy to install third-party Python dependent packages into your current environment. After the dependent packages are installed, the interfaces in them can be called where Python scripts are used. Dependency package management provides functions such as viewing, searching, installing, updating, and uninstalling.
View Installed Dependent Packages
Click the Python Environment Management button and select the Python environment in the pop-up dialog box list to display the Package Name, The current version and Newest Version installed in the current environment. Please click the Installed Package button. All third-party Python dependency packages installed with and any additional libraries that have been added are displayed.
Install dependent packages
Click the Add button to find or search the dependent package to be installed in the pop-up Add Package dialog box. Select the dependent package in the list to view its introduction, version, publisher and other information.
- Version: Newest Version is installed by default. You can select an earlier version from the Version drop-down options. Click the Install button to install the specified dependent package in the current environment.
- Repository Management: The server of the default Anaconda. Org repository is abroad, so sometimes the speed of downloading dependent packages is slow. Users can add other Repository Addresses to obtain and install the dependent packages in them.
Update dependent packages
If there is a new version of the Python dependency package, you can update the installed dependency package to Newest Version. Select the dependency package with the updated version and click the Update button to update it.
Delete
You can uninstall an installed dependent package. Select the dependent package to be removed in the list and click the Delete button to remove it. Note: The dependent library in the default environment is a required item. If it is removed, some Python functions will not be available. If you accidentally remove the necessary dependencies in the default environment, you can re-Add Package by creating a new environment.