pflagerd / code-editor-flask

Code editor written in HTML and CSS using FLask
0 stars 0 forks source link

What if `python -m venv` fails for some reason. #9

Open pflagerd opened 4 hours ago

pflagerd commented 4 hours ago

We found that we could execute help('modules') as a python program, but it would display the resulting list of modules on stdout as opposed to putting it into a string (or returning a string). It returns a NoneType.

We learned that pkg_resources might not be built-in. It also might be a hallucination of ChatGPT, although ChatGPT claims it is part of the setuptools package.

import site
print(site.getsitepackages())

Would tell us what directories to look in for venv, but we weren't convinced that the presence of a venv/ directory was proof positive that the venv module existed (i.e. what if this were the result of having run a venv?).