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

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

No module named 'aspose.words'; #64

Open Antonet99 opened 1 month ago

Antonet99 commented 1 month ago

Using Python 3.9.19 with pyenv on Intel macOS, but the same happens with 3.10.14. Installed aspose with "pip install aspose-words". Uninstalled and reinstalled several times, but every time i try to use the code

`import aspose.words as aw

doc = aw.Document("input.doc")

doc.save("output.pdf")`

it doesn't work -> ModuleNotFoundError: No module named 'aspose.words'; 'aspose' is not a package. Any advice?

falleretic commented 1 month ago

@Antonet99 Please try configuring https://docs.python.org/3/library/venv.html and installing Aspose.Words on that venv.

Antonet99 commented 1 month ago

Nothing changes, always the same error -> import aspose.words as aw ModuleNotFoundError: No module named 'aspose.words'; 'aspose' is not a package

falleretic commented 1 month ago

@Antonet99 It looks like you are trying to install Aspose.Words in global python instead of 3.9. I checked Python 3.9 with PyCharm and configured and installed lib correctly. I selected python 3.9 as the interpreter in the PyCharm settings, it was also set as the system interpreter in the PyCharm settings. Then, to make sure I was installing the libs correctly, I used 'pip3.9 install aspose-words' to install Aspose.Words.

falleretic commented 1 month ago

@Antonet99 You can also try to test it by running the following commands: 'python3 -m pip list' 'python3.9 -m pip list'