lululau

lululau

V2EX 第 15170 号会员,加入于 2011-12-23 18:29:12 +08:00
今日活跃度排名 5268
10 G 99 S 22 B
根据 lululau 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
lululau 最近回复了
12 小时 38 分钟前
回复了 GooogIe 创建的主题 Python 求助大黑:关于 macOS 的 Python 版本混乱的若干问题
把系统管理(包括 Homebrew 安装)的 Python 挂载到 pyenv 管理:
```
if [ -z "$HOMEBREW_PREFIX" ]; then
if [ -e "/opt/homebrew/bin/brew" ]; then
HOMEBREW_PREFIX="/opt/homebrew"
else
HOMEBREW_PREFIX="/usr/local"
fi
fi

mkdir -p ~/.pyenv/versions

if [ -e "$HOMEBREW_PREFIX/Cellar/python@2" ]; then
ln -nfs $HOMEBREW_PREFIX/Cellar/python@2/2*(On[1]) ~/.pyenv/versions/
ln -nfs $HOMEBREW_PREFIX/Cellar/python@2/2*(On[1]) ~/.pyenv/versions/2
fi

if [ -e "$HOMEBREW_PREFIX/Cellar/[email protected]" ]; then
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/3
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/3.12
fi

if [ -e "$HOMEBREW_PREFIX/Cellar/[email protected]" ]; then
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/3.11
fi

if [ -e "$HOMEBREW_PREFIX/Cellar/[email protected]" ]; then
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/3.10
fi


if [ -e "$HOMEBREW_PREFIX/Cellar/[email protected]" ]; then
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/3.9
fi

if [ -e "$HOMEBREW_PREFIX/Cellar/[email protected]" ]; then
ln -nfs $HOMEBREW_PREFIX/Cellar/[email protected]/3*(On[1]) ~/.pyenv/versions/3.8
fi

cd ~/.pyenv/versions/3/bin
cp -Rf python3.12 python3
cp -Rf python3 python
cp -Rf pip3.12 pip3
cp -Rf pip3 pip
cp -Rf pydoc3.12 pydoc3
cp -Rf python3.12-config python3-config
cp -Rf 2to3-3.12 2to3
cp -Rf idle3.12 idle3
ln -nfs wheel3.12 wheel3

if [ -e ~/.pyenv/versions/3.11 ]; then
cd ~/.pyenv/versions/3.11/bin
cp -Rf python3.11 python3
cp -Rf python3 python
cp -Rf pip3.11 pip3
cp -Rf pip3 pip
cp -Rf pydoc3.11 pydoc3
cp -Rf python3.11-config python3-config
cp -Rf 2to3-3.11 2to3
cp -Rf idle3.11 idle3
ln -nfs wheel3.11 wheel3
fi

if [ -e ~/.pyenv/versions/3.10 ]; then
cd ~/.pyenv/versions/3.10/bin
cp -Rf python3.10 python3
cp -Rf python3 python
cp -Rf pip3.10 pip3
cp -Rf pip3 pip
fi

if [ -e ~/.pyenv/versions/3.9 ]; then
cd ~/.pyenv/versions/3.9/bin
cp -Rf python3.9 python3
cp -Rf python3.9 python
cp -Rf pip3.9 pip3
cp -Rf pip3.9 pip
fi

if [ -e ~/.pyenv/versions/3.8 ]; then
cd ~/.pyenv/versions/3.8/bin
cp -Rf python3.8 python3
cp -Rf python3.8 python
cp -Rf pip3.8 pip3
cp -Rf pip3.8 pip
fi
```
18 天前
回复了 fusi 创建的主题 Visual Studio Code 想找一种 vscode 扩展
我也是这么用的,不过是在 Emacs 里:

```
(let ((result '()))
(dolist (elem (append lx/dirs lx/demo-files lx/config-files lx/org-files lx/cheatsheets lx/server-files) result)
(let ((kbd (nth 0 elem))
(func-name (nth 1 elem))
(dir (nth 2 elem)))
(eval `(lx/make-open-file-function ,func-name ,dir))
(add-to-list 'result kbd t)
(add-to-list 'result (intern (format "lx/open-file-%s" func-name)) t)))
(apply 'spacemacs/set-leader-keys result))
```

我觉得你可以尝试自己实现一下,顺便也就学会用 vscode 了
20 天前
回复了 lucasj 创建的主题 程序员 推荐几个你一直在用的开源项目工具
21 天前
回复了 wato 创建的主题 问与答 面对文明冲突,算不算一种精神疾病?
东北素质确实稍微低点,但是全国也都不怎么高,这是历史上多少次民族融合的结果
docker / k8s 不都是用来解决部署问题的吗,为什么要在开发机笔记本弄这些。。。
冷知识:macOS(包括 Mac OS X) 只有 Mac OS X 10.7 Lion 是类 UNIX 系统,因为这个版本没有获得 Open Group 的 UNIX03 认证 😂
39 天前
回复了 jeffson 创建的主题 问与答 大家多长时间给自己电脑做个保养呢?
每天做啊

brew upgrade ; brew post-update ; brew cleanup ; brew list --casks | xargs -I {} brew upgrade --cask {}; brew cleanup;
JB 家的 IDE 不是支持同时开多个 projects 吗,为什么需要开两个 IDEA ?
74 天前
回复了 magic3584 创建的主题 Apple 下次电脑硬盘一定要买 1t 的了
做 iOS/macOS 开发的硬盘起码要 2TB 起步
未完成九年义务教育,不犯法吗
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   6385 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 02:16 · PVG 10:16 · LAX 19:16 · JFK 22:16
Developed with CodeLauncher
♥ Do have faith in what you're doing.