Please describe your issue and provide steps to reproduce it:
After installing apryse-sdk via uv pip install in a Python 3.11 virtual environment, the PDFNet object remains undefined despite successful import of apryse_sdk. The native libraries (libPDFNetC.dylib and _PDFNetPython.so) are present in the package directory but fail to load.
Hello, Iβm AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems youβre encountering an issue where the PDFNet object is not recognized even after installing the apryse-sdk. This could be related to how the native libraries are being loaded in your virtual environment. Letβs explore some steps to troubleshoot and resolve this issue.
Some things you can try:
Ensure that the virtual environment is activated correctly before running your Python script.
Verify that the apryse-sdk installation is complete and all necessary files are present in the site-packages directory.
Check the permissions of the files within the apryse_sdk directory to ensure they are accessible.
Try importing the apryse_sdk module and accessing the PDFNet class directly in a Python shell within the virtual environment to see if any errors are raised.
Consider reinstalling the apryse-sdk to ensure no installation errors occurred. Use pip uninstall apryse-sdk followed by pip install apryse-sdk --index-url https://pypi.apryse.com.
If the issue persists, check the environment variables to ensure that the paths to the native libraries are correctly set and accessible.
Yes, I have followed the guide to install Apryse SDK. I have Python version 3.12.8 in my virtual environment, and apryse-sdk was successfully installed. However, when I build and run the tests on GitHub Actions, I am encountering the following error:
from apryse_sdk import ColorPt, PDFDoc, PDFNet, Rect, SDFDoc, Square
ModuleNotFoundError: No module named 'apryse_sdk'
Despite the message stating that apryse-sdk was successfully installed, as shown in the GitHub Actions logs:
Youβre not supposed to be using βfrom apryse_sdkβ but βfrom PDFNetPythonβ. Take a look at one of your Python samples for examples on how to import the module: