Skip to content

Commit

Permalink
doc: update docs/python.md (#564)
Browse files Browse the repository at this point in the history
when we installed pipenv pkg, we can't run pipenv install command on our local shell, because maybe we didn't have the site-package-bin dir in system $PATH, so we need to add it firstly.
  • Loading branch information
dwgeneral committed Mar 10, 2024
1 parent a15bd68 commit f7c2d65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,12 @@ brew upgrade pipenv # homebrew
```

```shell
# 将 pipenv 命令加入到系统环境变量 $PATH 中 (Unix and MacOS)
dir=$(python -c 'import site; print(site.USER_BASE + "/bin")') # 打印 python site-packages bin 路径
echo 'export PATH="'$dir':$PATH"' >> ~/.zshrc # 将 dir 路径加入到 PATH 中
source ~/.zshrc


# 安装 package
pipenv install <package name> # 不指定版本
pipenv install <package name>==<version> # 精确指定版本
Expand Down

0 comments on commit f7c2d65

Please sign in to comment.