grey in py, runs fine in Jupyter

57 views
Skip to first unread message

Amy Mann

unread,
Nov 8, 2021, 1:42:31 PM11/8/21
to Anaconda - Public
Novice level, I am running Windows 10 with Python 3.8 and Visual Studio Code 1.62.0. When I start my program with:

import datetime as dt

The command works fine in Jupyter, but is grey in VScode. How do I get python's datetime to be recognized in VScode? Amy

The following is the error I receive.

"dt" is not accessed Pylance  [note Pylance is also grey]
(module) dt

Concrete date/time and related types.

See http://www.iana.org/time-zones/repository/tz-link.html for time zone and DST data sources.


Amy Mann

unread,
Nov 11, 2021, 9:26:56 AM11/11/21
to Anaconda - Public, Amy Mann
I've tried the pip install datetime, but I'm guessing I don't have the correct environment open.  I'm don't know why datetime would not be in the VSCode library of programs.  Amy
Reply all
Reply to author
Forward
0 new messages