Setup Environment and Installation Guidelines

System Requirements

Aspose.Diagram for Python via Java is platform-independent API and can be used on any platform (Windows, Linux and MacOS) where Python is installed. The machine must have Java 8 or greater versions before setting up the installation.

Python Version

  • Python 3.5 or higher

Java Version

  • Java 1.8 or higher

Windows:

Install Java and add it to PATH environment variable

For example:

PATH=C:\Program Files\Java\jdk1.8.0_131;

Install Aspose.Diagram for Python via Java from pypi

You can easily use Aspose.Diagram for Python via Java from pypi with the following command.

 $ pip install aspose-diagram

Test Aspose.Diagram for Python via Java

  • Create a file named example.py and use the following sample code:
import jpype
import asposediagram
jpype.startJVM()
from asposediagram.api import *

diagram = Diagram()
diagram.save("output.vsdx",SaveFileFormat.VSDX)

jpype.shutdownJVM()
  • Now run “python example.py” @command prompt to run it.

Linux:

Install Java

Install Aspose.Diagram for Python via Java from pypi

You can easily use Aspose.Diagram for Python via Java from pypi with the following command.

 $ pip install aspose-diagram

Test Aspose.Diagram for Python via Java

  • Create a file named example.py and use the following sample code:
import jpype
import asposediagram
jpype.startJVM()
from asposediagram.api import *

diagram = Diagram()
diagram.save("output.vsdx",SaveFileFormat.VSDX)

jpype.shutdownJVM()
  • Now run “python example.py” @command prompt to run it.

macOS:

Install Java

Install Aspose.Diagram for Python via Java from pypi

You can easily use Aspose.Diagram for Python via Java from pypi with the following command.

 $ pip install aspose-diagram

Test Aspose.Diagram for Python via Java

  • Create a file named example.py and use the following sample code:
import jpype
import asposediagram
jpype.startJVM()
from asposediagram.api import *

diagram = Diagram()
diagram.save("output.vsdx",SaveFileFormat.VSDX)

jpype.shutdownJVM()
  • Now run “python example.py” @command prompt to run it.