执行pip安装时发生Git revparse头错误

2024-09-26 17:41:50 发布

您现在位置:Python中文网/ 问答频道 /正文

在尝试安装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了。不使用VPNgit命令在Powershell中工作正常。无论pip安装到venv还是常规pip安装,都会出现相同的错误。也从git bash得到相同的错误。不确定这是什么


Tags: installpipgitbuildvenv错误mbusers

热门问题