File size: 368 Bytes
bb85593 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import sys, importlib
import os
print('cwd:', os.getcwd())
print('sys.path[0]:', sys.path[0])
print('sys.path[:5]=', sys.path[:5])
spec = importlib.util.find_spec('fastapi')
print('find_spec fastapi:', spec)
try:
import fastapi
print('fastapi imported from', getattr(fastapi, '__file__', None))
except Exception as e:
print('import error:', e)
|