formulahendry / formulahendry/vscode-code-runner

code runner not working in with anaconda

Aperta
#683 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
2.4k
Fork
351
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Version: 1.50.1 (user setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
code runner version: 0.11.1

**Describe the bug**
If I run code runner on print('world') it works my output is 'world'
If I try using anaconda libraries like pandas it doesn't work I get an error message as seen below.

**To Reproduce**
import pandas as pd

def func(df):
return df

d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(d)

functest = func(df)
print(functest)

this is the code I am trying to run using the code runner I am getting the following result.

C:\Users\user\anaconda3\lib\site-packages\numpy\__init__.py:138: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Traceback (most recent call last):
File "c:\Users\user\Documents\Python Projects Main\test\test.py", line 1, in
import pandas as pd
File "C:\Users\user\anaconda3\lib\site-packages\pandas\__init__.py", line 16, in
raise ImportError(
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

* The Python version is: Python3.8 from "C:\Users\user\anaconda3\python.exe"
* The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

**Additional info**
1. I don't have Anaconda in my system path if that makes a difference.
2. conda is activated.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia riproducendo il fallimento dell'importazione di pandas e NumPy in Code Runner con la configurazione Windows Anaconda segnalata, quindi esamina come il runner seleziona e avvia Python. Il lavoro è completato quando lo script fornito viene eseguito tramite Code Runner e importa pandas correttamente, invece di non riuscire a caricare le DLL di NumPy.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
anaconda, python, vscode
Ambito
devtools, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.