python-3.x - 无法在 virtualenv 中运行 protoc
问题描述
我正在尝试用一些数据训练一个张量流预训练模型。我创建了一个虚拟环境来正确管理库的版本。但是,我无法在虚拟环境中运行“protoc”命令。它在虚拟环境之外运行良好,因为我已经将 protoc.exe 文件添加到路径中。
这是我得到的错误:
(environment_3_9_7) PS C:\Users\dipes\Desktop\Computer Vision\Computer Vision Assignment> protoc
protoc : The term 'protoc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ protoc
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (protoc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
如何将 protoc.exe 添加到 virtualenv 的路径中?
解决方案
只需将 protoc.exe 文件粘贴到虚拟环境的 /Scripts 中即可解决我的问题。
推荐阅读
- h2 - Ignite Query / SqlQuery / SqlFieldsQuery:“惰性”和“页面大小”实际上在做什么?
- opentok - OpenTok CreateSession“请求提交错误”
- angular6 - Angular 6 - 无法将标头添加到 httpClient (httpClient - @angular/common/http)
- java - 向我的 Spring Boot 项目添加新的依赖项会破坏现有的 @Autowired 设置
- ios - reloadData后无法单击tableView单元格中的按钮
- coldfusion - 在 ColdFusion 中将结构创建为按钮
- python - 使用 pandas 数据框从 TSNE 的输出中标记 matplotlib 散点图上的点
- webpack-dev-server - 以编程方式或 CLI 停止 webpack-dev-server
- bash - Bash脚本 - 无法使用存储在变量中的特殊字符执行命令
- groovy - groovy 转义双引号 $