Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
victorcsc123 opened this issue Jun 30, 2021 · 16 comments

Comments

@victorcsc123
Copy link

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
Copy link

@victorcsc123 , can you verify if it exists
image

@victorcsc123
Copy link
Author

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

@manishs17
Copy link

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
Copy link
Author

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

@victorcsc123
Copy link
Author

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
Copy link
Author

@manishs17
Copy link

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
Copy link
Author

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
Copy link

try with docker.

@victorcsc123
Copy link
Author

[+] 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
Copy link
Author


** 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
Copy link
Author

How can I completely develop the docker image/container?

@manishs17
Copy link

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
Copy link
Author

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
Copy link

[+] 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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants