I am trying to work with both aspose-slides and aspose-words. However, I’m finding if I pip install aspose-words first, then I get a conflict trying to import aspose-words (but not aspose-slides).
Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug 6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import aspose.words as aw
ImportError: Unable to import module dependencies. Cannot import the aspose.pyreflection module. The aspose.pyreflection module found has a version (‘24.5.3.0’) that is lower than the referenced version of that module (‘25.8.0.0’).
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “”, line 1, in
ImportError: One or more errors occurred while loading the module ‘aspose.words’ (-1009)
import aspose.slides as slides
Note, no error here
Then If I pip install aspose-slides first, I get an issue with importing aspose.slides, but not aspose.words:
Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug 6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import aspose.slides as slides
AttributeError: module ‘aspose.pydrawing’ has no attribute ‘_C_APITV1_SizeF’
The above exception was the direct cause of the following exception:
ImportError: can’t import capsule ‘aspose.pydrawing._C_APITV1_SizeF’
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “”, line 1, in
ImportError: One or more errors occurred while loading the module ‘aspose.slides’ (-1009)
import aspose.words as aw
Note, no error here
I am unsure what to do about this. I am currently using Python 3.12.5 as the above text copied from my interpreter shows. I can’t find any documentation about a conflict like this. Here’s what pip list shows for aspose packages I have installed:
aspose-cells 25.9.0
aspose_slides 25.9.0
aspose-words 25.10.0
I am also trying to use aspose-cells, but that seems to be okay as long as I install it last (in both of the above cases). Granted, I have not begun evaluating it’s use otherwise.
@seanwhitsitt
It appears you are facing version conflicts between the Aspose libraries while attempting to import them in Python. The error messages suggest that there are mismatched versions of the aspose.pyreflection module, leading to these import issues.
Here are some steps to help you resolve this:
-
Check Compatibility: Verify that the versions of aspose-words, aspose-slides, and any other Aspose libraries you are using are compatible with each other. Refer to the official documentation or release notes for compatibility details.
-
Upgrade/Downgrade Packages: Consider upgrading or downgrading the packages to ensure they are all on compatible versions. You can use the following command to upgrade:
pip install --upgrade aspose-words aspose-slides
Alternatively, specify a version if necessary:
pip install aspose-words==25.9.0 aspose-slides==25.9.0
-
Install Order: The order of installation can impact imports. Try installing aspose-words and aspose-slides in different sequences to determine if one order resolves the issue.
-
Virtual Environment: Utilize a virtual environment to isolate your project dependencies. This approach can help prevent conflicts with other installed packages.
-
Check for Updates: Ensure you are using the latest versions of the libraries, as newer releases may resolve existing issues.
If the problem persists, consider reaching out to the Aspose support forums for more tailored assistance regarding your specific issue.
Further investigation shows an error when trying pip install aspose-total-net as well (granted this provides more than I was looking for to begin with, so the ideal would still be to simply install aspose-words, aspose-slides, and aspose-cells-python):
Collecting aspose-total-net
Downloading aspose_total_net-25.9.0-py3-none-any.whl.metadata (15 kB)
INFO: pip is looking at multiple versions of aspose-total-net to determine which version is compatible with other requirements. This could take a while.
Downloading aspose_total_net-25.7.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-25.6.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-25.5.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-25.4.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-25.3.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-25.2.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-25.1.0-py3-none-any.whl.metadata (16 kB)
INFO: pip is still looking at multiple versions of aspose-total-net to determine which version is compatible with other requirements. This could take a while.
Downloading aspose_total_net-24.12.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-24.11.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-24.10.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-24.9.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-24.8.0-py3-none-any.whl.metadata (16 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
Downloading aspose_total_net-24.7.0-py3-none-any.whl.metadata (16 kB)
Downloading aspose_total_net-24.6.0-py3-none-any.whl.metadata (15 kB)
Downloading aspose_total_net-24.5.0-py3-none-any.whl.metadata (15 kB)
Downloading aspose_total_net-24.4.0-py3-none-any.whl.metadata (14 kB)
Downloading aspose_total_net-24.3.0-py3-none-any.whl.metadata (14 kB)
Downloading aspose_total_net-24.2.0-py3-none-any.whl.metadata (14 kB)
Downloading aspose_total_net-24.1.0-py3-none-any.whl.metadata (13 kB)
Downloading aspose_total_net-23.12.0-py3-none-any.whl.metadata (13 kB)
Downloading aspose_total_net-23.11.0-py3-none-any.whl.metadata (13 kB)
Downloading aspose_total_net-23.10.0-py3-none-any.whl.metadata (13 kB)
Downloading aspose_total_net-23.9.0-py3-none-any.whl.metadata (12 kB)
Downloading aspose_total_net-23.8.0-py3-none-any.whl.metadata (11 kB)
Downloading aspose_total_net-23.7.0-py3-none-any.whl.metadata (11 kB)
Downloading aspose-total-net-22.6.0.tar.gz (4.2 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "c:\users\sean_ohxx9v1\appdata\local\programs\python\python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
main()
File "c:\users\sean_ohxx9v1\appdata\local\programs\python\python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\users\sean_ohxx9v1\appdata\local\programs\python\python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sean_ohxx9v1\AppData\Local\Temp\pip-build-env-_11yasda\overlay\Lib\site-packages\setuptools\build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sean_ohxx9v1\AppData\Local\Temp\pip-build-env-_11yasda\overlay\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "C:\Users\sean_ohxx9v1\AppData\Local\Temp\pip-build-env-_11yasda\overlay\Lib\site-packages\setuptools\build_meta.py", line 512, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\sean_ohxx9v1\AppData\Local\Temp\pip-build-env-_11yasda\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 4, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
@seanwhitsitt,
I tested it and tried to install Aspose.Total for Python via .NET from pip, it works fine and I do not get any error. All the Python via .NET libraries are installed fine. Here is the terminal display/output in vs code:
PS ......> pip install aspose-total-net
Defaulting to user installation because normal site-packages is not writeable
Collecting aspose-total-net
Downloading aspose_total_net-25.9.0-py3-none-any.whl (6.3 kB)
Collecting aspose-tasks==25.9.0
Downloading aspose_tasks-25.9.0-py3-none-win_amd64.whl (51.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.2/51.2 MB 621.2 kB/s eta 0:00:00
Collecting aspose-slides==25.9.0
Downloading aspose_slides-25.9.0-py3-none-win_amd64.whl (73.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.0/73.0 MB 741.0 kB/s eta 0:00:00
Requirement already satisfied: aspose-barcode-for-python-via-net==25.7 in c:\users\hp\appdata\roaming\python\python39\site-packages (from aspose-total-net) (25.7)
Collecting aspose-imaging-python-net==25.9.0
Downloading aspose_imaging_python_net-25.9.0-py3-none-win_amd64.whl (70.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.9/70.9 MB 246.3 kB/s eta 0:00:00
Collecting aspose-tex-net==25.8.0
Downloading aspose_tex_net-25.8.0-py3-none-win_amd64.whl (53.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.2/53.2 MB 1.2 MB/s eta 0:00:00
Collecting aspose-cells-python==25.9.0
Downloading aspose_cells_python-25.9.0-py3-none-win_amd64.whl (58.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.6/58.6 MB 983.3 kB/s eta 0:00:00
Collecting aspose-page==25.8.0
Downloading aspose_page-25.8.0-py3-none-win_amd64.whl (50.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.9/50.9 MB 1.2 MB/s eta 0:00:00
Collecting aspose-email-for-python-via-net==25.9
Downloading Aspose.Email_for_Python_via_NET-25.9-py3-none-win_amd64.whl (57.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.9/57.9 MB 947.9 kB/s eta 0:00:00
Collecting aspose-pdf==25.9.0
Downloading aspose_pdf-25.9.0-py3-none-win_amd64.whl (95.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.0/95.0 MB 409.8 kB/s eta 0:00:00
Collecting aspose-diagram-python==25.9
Downloading aspose_diagram_python-25.9-py3-none-win_amd64.whl (47.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 47.4/47.4 MB 166.6 kB/s eta 0:00:00
Collecting aspose-zip==25.9.0
Downloading aspose_zip-25.9.0-py3-none-win_amd64.whl (39.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.0/39.0 MB 568.8 kB/s eta 0:00:00
Collecting aspose-gis-net==25.8.0
Downloading aspose_gis_net-25.8.0-py3-none-win_amd64.whl (61.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.8/61.8 MB 323.6 kB/s eta 0:00:00
Collecting aspose-svg-net==25.9.0
Downloading aspose_svg_net-25.9.0-py3-none-win_amd64.whl (57.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.2/57.2 MB 637.7 kB/s eta 0:00:00
Collecting aspose-ocr-python-net==25.9.0
Downloading aspose_ocr_python_net-25.9.0-py3-none-win_amd64.whl (126.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.0/126.0 MB 781.8 kB/s eta 0:00:00
Collecting aspose-3d==25.9.0
Downloading aspose_3d-25.9.0-py3-none-win_amd64.whl (45.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.5/45.5 MB 470.4 kB/s eta 0:00:00
Collecting aspose-words==25.9.0
Downloading aspose_words-25.9.0-py3-none-win_amd64.whl (67.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.0/67.0 MB 348.3 kB/s eta 0:00:00
Collecting aspose-psd==25.9.0
Downloading aspose_psd-25.9.0-py3-none-win_amd64.whl (58.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.2/58.2 MB 201.3 kB/s eta 0:00:00
Collecting aspose-finance==25.3
Downloading aspose_finance-25.3-py3-none-win_amd64.whl (49.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.2/49.2 MB 522.2 kB/s eta 0:00:00
Collecting aspose-html-net==25.9.0
Downloading aspose_html_net-25.9.0-py3-none-win_amd64.whl (56.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.7/56.7 MB 432.0 kB/s eta 0:00:00
Installing collected packages: aspose-zip, aspose-words, aspose-tex-net, aspose-tasks, aspose-svg-net, aspose-slides, aspose-psd, aspose-pdf, aspose-page, aspose-ocr-python-net, aspose-imaging-python-net, aspose-html-net, aspose-gis-net, aspose-finance, aspose-email-for-python-via-net, aspose-diagram-python, aspose-cells-python, aspose-3d, aspose-total-net
Attempting uninstall: aspose-cells-python
Found existing installation: aspose-cells-python 25.8.0
Uninstalling aspose-cells-python-25.8.0:
Successfully uninstalled aspose-cells-python-25.8.0
Successfully installed aspose-3d-25.9.0 aspose-cells-python-25.9.0 aspose-diagram-python-25.9 aspose-email-for-python-via-net-25.9 aspose-finance-25.3 aspose-gis-net-25.8.0 aspose-html-net-25.9.0 aspose-imaging-python-net-25.9.0 aspose-ocr-python-net-25.9.0 aspose-page-25.8.0 aspose-pdf-25.9.0 aspose-psd-25.9.0 aspose-slides-25.9.0 aspose-svg-net-25.9.0 aspose-tasks-25.9.0 aspose-tex-net-25.8.0 aspose-total-net-25.9.0 aspose-words-25.9.0 aspose-zip-25.9.0
PS ......>
@seanwhitsitt,
We think the issue is likely due to the version of the wrapper tool being outdated, as indicated by the error message. After installing the Aspose.Slides for Python package, we noticed that the wrapper tool version was not up to date, which seems to be causing the conflict error. Our colleagues from the Aspose.Slides team will review this matter and provide their input soon. @andrey.potapov FYI. Also, @alexey.noskov FYI.
@seanwhitsitt,
I have reproduced the errors you described.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESPYNET-312
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.