I am using a machine I inherited with an Anaconda 3 installation on it. I am trying to complete a Python course, which is my first foray into Python ever. When I open a Python interpreter in Command Prompt or PowerShell, and I run the following line, it executes without error.
(base) PS D:\ProgramData\Anaconda3\Scripts> py
Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import xlsxwriter
Somehow Anaconda is integrated with VS Code, yet when I try and import xlsxwriter
in this window, I get the error:
ModuleNotFoundError: No module named 'xlslwriter'
When this Python interpreter window opens, it shows the following:
Jupyter Server URI: http://localhost:8889/?token=b8a07e61e603f9dae0ee599198ac33f68d3f398036f6af0e
Python version:
3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
(6, 0, 1)
D:\\ProgramData\\Anaconda3\\envs\\py37\\python.exe
If I try installing xlsxwriter
with pip
, I get a message that
Requirement already satisfied: xlsxwriter in d:\programdata\anaconda3\lib\site-packages (1.2.8)
I'm not asking for an instant answer, but guidance on how I can diagnose and correct this problem. Why is the module available to some interpreters (Command Prompt and PowerShell, and Jupyter Notebook) and not available in the VS Code interpreter? How can I use VS Code and or Python functionality to learn about the config of the current environment and such things?