Lines
Slide
Slide
Slide
Slide
Slide
Slide
Slide
Slide

INVENTED
WORLDS

VS-Code (Cursor) настройка окружения

Предварительные установки

Python Выбрать LTS https://devguide.python.org/versions/ https://www.python.org/downloads/windows/ - галку на PATH, Customise inst - все галки - все галки, в C:\Python38-32 Проверить where.exe python python -V which python

Git https://git-scm.com/install/windows При установке поменять -use git and optional unix tools... -checkout as-is, commit Unix-style... Остальное оставить по умолчанию

Cygwin https://www.cygwin.com/install.html

Плагины

- Python - Code Runner (run in terminal в настройке)

Пользовательские настройки

view - command palette open user settings json

{
    "files.autoSave": "afterDelay",
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "code-runner.runInTerminal": true,
    "explorer.compactFolders": false,
    "code-runner.executorMap": {
        "python": ".venv/Scripts/python -u"
    },
    "terminal.integrated.env.windows": {
        "VIRTUAL_ENV": "${workspaceFolder}/.venv",
        "PATH": "${workspaceFolder}/.venv/Scripts:${env:PATH}"
    },
    "python.createEnvironment.trigger": "off",
    "workbench.colorTheme": "Default Dark Modern",
    "cursor.semanticSearch.includePullRequests": false
}

Для линукса

{
    "files.autoSave": "afterDelay",
    "code-runner.runInTerminal": true,
    "code-runner.executorMap": {
        "python": ".venv/bin/python -u"
    },
    "git.autoRepositoryDetection": "subFolders",
    "explorer.compactFolders": false,
    "terminal.integrated.profiles.linux": {
        "bash": {
            "path": "/bin/bash"
        }
    },
    "terminal.integrated.env.linux": {
        "VIRTUAL_ENV": "${workspaceFolder}/.venv",
        "PATH": "${workspaceFolder}/.venv/bin:${env:PATH}"
    },
    "terminal.integrated.defaultProfile.linux": "bash",
    "git.suggestSmartCommit": false,
}

Работа в проекте

ПКМ в области WORKSPACE -> Add folder to workspace ПКМ на папке проекта -> Open in integrated terminal Создать изолированное пространство

python -m venv .venv

ПКМ на скрипте -> Run Code

Комментарии

Комментариев пока нет.