Ericsson / eva

EVA is a web-based tool for efficient annotation of videos and image sequences and has an additional tracking capabilities
BSD 2-Clause "Simplified" License
121 stars 25 forks source link

RuntimeError: Attempted to compile AOT function without the compiler used by `numpy.distutils` present. Cannot find suitable msvc. #28

Open victorcsc123 opened 3 years ago

victorcsc123 commented 3 years ago

When i run python manage.py preparetracker, I encounter RuntimeError: Attempted to compile AOT function without the compiler used by numpy.distutils present. Cannot find suitable msvc. I already installed visual studio 2019 C++, what else can I do?

manishs17 commented 3 years ago

@victorcsc123 , can you verify if it exists image

victorcsc123 commented 3 years ago

Yes, when I use developer command prompt and I type cl, I have exact the same as you have shown

manishs17 commented 3 years ago

can you install Build tools,

Build Tools for Visual Studio 2019

you can find that in this page, https://visualstudio.microsoft.com/downloads/ scroll down until you see Tools for Visual Studio under the All downloads section and select the download for Build Tools for Visual Studio.

victorcsc123 commented 3 years ago

Yes, I installed visual studio 2019 building tool and tick the C++box to install

victorcsc123 commented 3 years ago

I try to uninstall and reinstall many times, still failed to run. The error keep appearing. Do I miss some path so that numba can't recognise the compiler?

victorcsc123 commented 3 years ago

I use this link to install https://visualstudio.microsoft.com/zh-hant/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16

manishs17 commented 3 years ago

okay, I hope you have python 3.6 and correct numba version. can you try to execute python manage,py preparetracker from VS Developer command prompt ?

victorcsc123 commented 3 years ago

Yes, I type python --version. It said 3.6.0. and I have run that in vs developer too. Still failed. May be its my computer's problem. But this problem makes me sad, sigh......

manishs17 commented 3 years ago

try with docker.

victorcsc123 commented 3 years ago

[+] Building 7.7s (18/23) => [eva_eva internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [eva_celery internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [eva_eva internal] load .dockerignore 0.2s => => transferring context: 34B 0.0s => [eva_celery internal] load .dockerignore 0.2s => => transferring context: 34B 0.0s => [eva_eva internal] load metadata for docker.io/library/python:3.6-slim 6.6s => [auth] library/python:pull token for registry-1.docker.io 0.0s => [eva_celery internal] load build context 0.2s => => transferring context: 14.43kB 0.1s => [eva_eva 1/9] FROM docker.io/library/python:3.6-slim@sha256:dbfadc4c25829adbe51e3751ba0f7a51cb0eca4cca7828e52 0.0s => [eva_eva internal] load build context 0.2s => => transferring context: 14.43kB 0.1s => CACHED [eva_celery 2/9] RUN mkdir /app 0.0s => CACHED [eva_celery 3/9] WORKDIR /app 0.0s => CACHED [eva_celery 4/9] RUN apt-get update && apt-get install -y libglib2.0-dev libsm6 libxext6 libxr 0.0s => CACHED [eva_celery 5/9] COPY requirements.txt /app/ 0.0s => CACHED [eva_celery 6/9] RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt & 0.0s => CACHED [eva_celery 7/9] COPY . /app/ 0.0s => CACHED [eva_celery 8/9] RUN mv /app/eva/deploy_settings /app/eva/deploy_settings.py 0.0s => CACHED [eva_celery 9/9] RUN python manage.py preparetracker 0.0s => [eva_eva] exporting to image 0.3s => => exporting layers 0.0s => => writing image sha256:8d5f020d320dca0c454f747a0e59ea7f8fc0731116adc75c247dd63ef5a1454a 0.0s => => naming to docker.io/library/eva_celery 0.0s => => naming to docker.io/library/eva_eva

When I run docker, it stopped at 18/23

victorcsc123 commented 3 years ago

Visual Studio 2019 Developer Command Prompt v16.10.3 Copyright (c) 2021 Microsoft Corporation


C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>cl Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30038.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ] . . .

. raise RuntimeError(msg) RuntimeError: Attempted to compile AOT function without the compiler used by numpy.distutils present. Cannot find suitable msvc.

victorcsc123 commented 3 years ago

How can I completely develop the docker image/container?

manishs17 commented 3 years ago

Docker should just work fine, it installs g++ .

use power shell. Install docker desktop on your windows machine, cd to the cloned directory and execute. docker-compose build , it would build your image using docker-compose.yml and start the container

victorcsc123 commented 3 years ago

Thank you so much for your reply. I am so sorry to bother you. Although I successfully launch the web, but it always said fail to upload. I am not sure if it is due to the fact that when I run docker, it stopped at 18/23

manishs17 commented 3 years ago

[+] Building 7.7s (18/23) => [eva_eva internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [eva_celery internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [eva_eva internal] load .dockerignore 0.2s => => transferring context: 34B 0.0s => [eva_celery internal] load .dockerignore 0.2s => => transferring context: 34B 0.0s => [eva_eva internal] load metadata for docker.io/library/python:3.6-slim 6.6s => [auth] library/python:pull token for registry-1.docker.io 0.0s => [eva_celery internal] load build context 0.2s => => transferring context: 14.43kB 0.1s => [eva_eva 1/9] FROM docker.io/library/python:3.6-slim@sha256:dbfadc4c25829adbe51e3751ba0f7a51cb0eca4cca7828e52 0.0s => [eva_eva internal] load build context 0.2s => => transferring context: 14.43kB 0.1s => CACHED [eva_celery 2/9] RUN mkdir /app 0.0s => CACHED [eva_celery 3/9] WORKDIR /app 0.0s => CACHED [eva_celery 4/9] RUN apt-get update && apt-get install -y libglib2.0-dev libsm6 libxext6 libxr 0.0s => CACHED [eva_celery 5/9] COPY requirements.txt /app/ 0.0s => CACHED [eva_celery 6/9] RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt & 0.0s => CACHED [eva_celery 7/9] COPY . /app/ 0.0s => CACHED [eva_celery 8/9] RUN mv /app/eva/deploy_settings /app/eva/deploy_settings.py 0.0s => CACHED [eva_celery 9/9] RUN python manage.py preparetracker 0.0s => [eva_eva] exporting to image 0.3s => => exporting layers 0.0s => => writing image sha256:8d5f020d320dca0c454f747a0e59ea7f8fc0731116adc75c247dd63ef5a1454a 0.0s => => naming to docker.io/library/eva_celery 0.0s => => naming to docker.io/library/eva_eva

When I run docker, it stopped at 18/23

what error was thrown ?

victorcsc123 commented 3 years ago

No error was thrown. Just stopped itself at 18/23