formulahendry / formulahendry/vscode-code-runner

code runner not working in with anaconda

Open
#683 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.