python - 如何确保我在 jupyter notebook 中使用的 py env 使用的是我从 github 克隆的转换器版本/代码?
问题描述
我确实在我的 github 帐户中分叉了 transformers repo,然后我做了:
git clone --recursive https://github.com/myaccount/transformers.git
cd transformers/
conda create -n hf-dev-py380 python=3.8.0
conda activate hf-dev-py380
git checkout v4.9.2-release
pip install -e “.[dev]”
conda install -c conda-forge librosa
conda install libgcc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/miniconda3/lib/
transformers-cli env
conda install jupyter
nohup jupyter notebook --ip=0.0.0.0 --port=myport &
在我的 jupyter 笔记本中,我打印:
import transformers
print(transformers)
<module ‘transformers’ from ‘/mypath/miniconda3/lib/python3.7/site-packages/transformers/init.py’>
如何确保我的 jupyter notebook 正在使用我在终端中克隆的转换器代码?
谢谢!
解决方案
推荐阅读
- react-native - React Native 中的自动链接依赖项
- android - Sony Bravia TV KD-55AF8:安装 HTML5 应用程序?
- julia - 如何在 Julia-1.2.0-1 中加载 PyPlot 包
- c - 可以通过重新编译将“libc”移动到另一个系统吗?
- asp.net-core - 在使用 WebApplicationFactory 进行集成测试期间,Serilog 控制台输出不显示
- python - 我对变量的字节大小有疑问
- android - 在 Kotlin 中按 ID 查找按钮
- python - 使用 Python 从多个文件夹中提取所有文件
- c - 我们必须如何声明一个结构?
- swiftui - 使用 SwitUI 执行操作后如何转到特定的选项卡视图?