python - 执行 pip 安装时出现 Git rev-parse HEAD 错误
问题描述
尝试安装 python 包datatable
时,出现以下错误:
(venv) PS C:\Users\MART\Documents\Environments\cyber_analytics> pip install --no-cache-dir datatable
Collecting datatable
Downloading datatable-0.11.1.tar.gz (1.0 MB)
|████████████████████████████████| 1.0 MB 2.2 MB/s
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mart\documents\environments\cyber_analytics\venv\scripts\python.exe' 'c:\users\mart\documents\environments\cyber_analytics\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\MART\AppData\Local\Temp\tmpk2pl2ss5'
cwd: C:\Users\MART\AppData\Local\Temp\pip-install-n_splmzn\datatable_1a7c5d06a08549a2a938f9d9bd82ab76
Complete output (2 lines):
Command `git rev-parse HEAD` failed with code 128: fatal: not a git repository (or any of the parent directories): .git
我已经在我的机器上安装了 git,并且已经在使用 repos 了。不使用VPN。git
命令在 Powershell 中运行良好。无论 pip install intovenv
还是一般 pip install,都会出现相同的错误。也得到同样的错误git bash
。不确定这可能是什么。
解决方案
Python 3.9.5
您可以通过从 切换到来解决这个问题Python 3.8.x
,因为该datatable
包具有适用于 Python 3.6-8.x 版本的轮子。
推荐阅读
- perl - 带有附加参数的 dbix::class 多对多 JSON
- python - Django - order_by 使用字段的 INT 部分的查询集
- python - 有没有办法将 dtype 的结果写入 csv 文件?
- node.js - 有没有办法通过节点 js 执行 gcloud 命令?
- c# - 为热图混合我的热点的颜色渐变?
- autokey - 如何在自动键中交换键盘键
- flutter - 卡在从 Flutter 引擎下载 Dart SDK
- javascript - 如何使用 select2 预先选择下拉树的选项?
- variables - Gitlab计划变量不能在yaml文件中使用
- layout - 如何在 SwiftUI 中对齐底部的文本