I have seen this issue with some resolutions already, but none have worked for my issue. I have pip installed the latest version of office365(v 2.2.0) to my knowledge using the command:
pip install office365-rest-client
I am trying to import using the following lines of code:
from office365.runtime.auth.authentication_context import AuthenticationContext
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.files.file import File
I receive the following error:
ModuleNotFoundError: No module named 'office365'
Just to test it out, I uninstalled and reinstalled pandas, then successfully imported pandas into my project.
Install office365-REST-Python-Client and office365 with the following commands:
pip install office365-REST-Python-Client
pip install office365
After that, restart your IDE and re-import the packages.
If you're installing to an environment that's not on your local machine, you can add the python -m prefix to ensure it gets installed in the correct location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With