Summary
In my project, the Python scripts are all written in single files. Each file may have different environments. I hope that within a single Python script, I can declare the running Python version and related dependencies through comments,for example main.py:
# -*- env_name: figma_export_color -*-
# -*- py_version: 3.8 -*-
# -*- dependencies: [pyyaml==6.0.2, requests] -*-
import sys
import re
import yaml
import json
import os
...
then:
Summary
In my project, the Python scripts are all written in single files. Each file may have different environments. I hope that within a single Python script, I can declare the running Python version and related dependencies through comments,for example
main.py:then: