aspose-words / Aspose.Words-for-Python-via-.NET

Aspose.Words for Python via .NET examples and showcases
MIT License
104 stars 22 forks source link

Can't import aspose on my Mac #59

Closed Treata11 closed 2 months ago

Treata11 commented 2 months ago

I've already installed aspose-words.

$ pip install aspose-words

Requirement already satisfied: aspose-words in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (24.5.0)

& python is installed on my machine:

$ brew info python
==> python@3.12: stable 3.12.3 (bottled)

Installed
/opt/homebrew/Cellar/python@3.12/3.12.3 (3,296 files, 66.2MB) *

However, I'm unable to import aspose in any python script:

import aspose.words as aw
...

err:

$ /opt/homebrew/bin/python3 /Users/alaa/Developer/BASS/Docs/aspose-convertCHM2HTML.py
Traceback (most recent call last):
  File "/Users/alaa/Developer/BASS/Docs/aspose-convertCHM2HTML.py", line 1, in <module>
    import aspose.words as aw
ModuleNotFoundError: No module named 'aspose'

I have an ARM64 M1 MBA with macOS 14.5 & I'm using VSCode here.

I tried to import the package using different python versions, but the issue persisted.

Treata11 commented 2 months ago

It's an issue related to an externally managed environment (caused by VSCode and Brew here) & has nothing to do with the package itself. Honestly, running Python could be a mess in macOS ...