environment variables https://docs.python.org/release/3.10.0/using/cmdline.html#environment-variables compile options https://docs.python.org/release/3.10.0/using/configure.html
Version Infoimport sys print(sys.version_info)python -V
There are a few formats available to consolidate project dotfiles.
See helpful https://snarky.ca/what-the-heck-is-pyproject-toml/
PEP-518 python setup.cfg
Where python looks for modules
similar to .profile or .bashrc. Sets up interpreter environment
points to the root python directory. typically either
disable all warnings
Simply import the bulitin
readlinelibrary to enable command completion and other readline features like vi mode.
You can do this automatically by configuring a pythonrc.# ~/.pythonrc try: import readline except: pass
You can customize the python startup sequence (both interactive and noninteractive) by creating a custom
sitecustomize.pyfile in your user_site directory. (which can be obtained with
You can add user-specific site-packages to a python install with the site module (with the advantage that *.pth files will be evaluated).import site site.add_sitedir('/tmp/my-site-dir')
Change the following registry-key in Windows. Alternatively, change the order that python appears on your
$PATHvariable.HKLM\SOFTWARE\Python\PythonCore\2.7\InstallPath type: REG_SZ data: C:\Python2.7.3_x64\
Python modules that require compiling must be compiled with the same compiler that python itself was built with. Microsoft distributes a minimalist compiler environment specifically for use with python/pip.