ModuleNotFound Error After Installing

Hi all,

I’ve just installed the Aspose package in Python to try splitting a test html file into sections, but when I attempt to import aspose.words as aw, I receive an error reading:

ModuleNotFoundError: No module named 'aspose.words'; 'aspose' is not a package

Per the instructions on the website, I installed the package as pip install aspose-words, and did so through VSCode, in a virtual environment running on Python 3.9.6. I am doing all this on a MacOS 14.4.1.

I’m not incredibly experienced with the technical issues of installing packages on Python, so I’m not sure what I did wrong, but if anyone has any advice on how to get around this, I’d greatly appreciate it.

Thanks!

@rnmhugji Does pip install aspose-words return any error message while installing Aspose.Words? What virtual environment you are trying to install Aspose.Words to (OS and CPU type)?

@alexey.noskov I don’t see any error message when I enter pip install aspose-words, so I’m assuming that it was installed successfully:

Requirement already satisfied: aspose-words in ./.venv/lib/python3.9/site-packages (24.5.0)

The virtual environment was installed on VSCode and uses Python 3.9.6 as an interpreter. The VSCode runs on a MacOS 14.4.1 with a 2 GHz Quad-Core Intel Core i5 CPU.

@rnmhugji Most likely the package is installed in global interpreter, not the virtual environment. Looks like you have the same problem as described here:
https://stackoverflow.com/questions/75935576/how-to-install-python-packages-for-a-vs-code-virtual-environment