Xiangxiang's Personal Site

Machine Learning & Security Engineer
生命不息,折腾不止,留下一点活着的记录.

View on GitHub
15 November 2024

离线环境配置(持续更新中)

by xiangxiang

离线状态下配置环境真的头疼

WSL

apt-get update
apt-get dist-upgrade --download-only
# /var/cache/apt/archives

apt-get dist-upgrade

apt-get install --download-only git libssl-dev libffi-dev build-essential python3-pip python3-venv

# https://devguide.python.org/getting-started/setup-building/#install-dependencies

Windows Terminal

# Administrator
Add-AppxPackage -Path .\Microsoft.VCLibs.x64.14.00.Desktop.appx

VSCode

commit_id=f06011ac164ae4dc8e753a3fe7f9549844d15e35

# Download url is: https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
curl -sSL "https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable" -o vscode-server-linux-x64.tar.gz

mkdir -p ~/.vscode-server/bin/${commit_id}
tar zxvf vscode-server-linux-x64.tar.gz -C ~/.vscode-server/bin/${commit_id} --strip 1
touch ~/.vscode-server/bin/${commit_id}/0

Python

python -m venv some-path

# Internet Access
python -m pip download -r requirements.txt -d wheelhouse

# No Internet Access
python -m pip install -r requirements.txt --no-index --find-links wheelhouse

Node

root: YOUR_NVM_HOME    # D:\nvm
path: YOUR_NVM_SYMLINK # D:\nvm\nodejs
arch: 64
proxy: none
nvm list
nvm use 22.11.0
node -v
tags: win10 env-setings offline