0

When trying to install the python package datatable, I get the following error:

(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

I have git installed on my machine and have been doing work with repos already. Not using a VPN. git commands work just fine from Powershell. Same error regardless of pip install into venv or general pip install. Also get the same error from git bash. Not sure what this could be.

  • 2
    it should be installing a wheel instead of building from source -- my guess is you're using 32bit python on windows so it cannot find a prebuilt package (it looks like this package isn't ~generally buildable from source) – anthony sottile Jun 07 '21 at 17:50
  • 1
    @AnthonySottile I am using 64-bit python. Here is the output from the python command detailing the specific version: `Python 3.9.5 [MSC v.1928 64 bit (AMD64)]` – Martin Michalski Jun 07 '21 at 18:23
  • 1
    ah that was the other option -- they do not yet support python3.9 – anthony sottile Jun 07 '21 at 18:56
  • 1
    @AnthonySottile yes, this is what was the issue. Using 3.8.x resolved this – Martin Michalski Jun 07 '21 at 19:17
  • @MartinMichalski, since this solved your use case, do you mind adding it as answer and accepting it, so that this issue will be closed. It will also help others who may have similar issue – sammywemmy Jun 09 '21 at 10:52

1 Answers1

1

You can solve this by switching from Python 3.9.5 to Python 3.8.x, since the datatable package has wheels for Python versions 3.6-8.x.