Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99726

Visual Studio Code doesn't recognize my anaconda packages and modules

$
0
0

I'm new to Machine Learning and im trying to get used to VS Code, so I tried to use it but quickly ran into some problems (not knowing how to run python on the terminal, using the conda environment, etc). The main problem was that the packages that i have with anaconda didn't work in VS Code.

I've tried everything but I'm unable to get it running in the terminal. I'll explain myself with this example.

Example code:

#Not my actual code, but it's an example
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl

x = np.linspace(0, 20, 100)
plt.plot(x,np.sin(x))
plt.show()

When i run it, this shows up in the terminal

Traceback (most recent call last):
  File "c:/Users/arman/Desktop/Untitled-1.py", line 2, in <module>
    import numpy as np
  File "C:\Users\arman\Anaconda3\lib\site-packages\numpy\__init__.py", line 140, in <module>
    from . import _distributor_init
  File "C:\Users\arman\Anaconda3\lib\site-packages\numpy\_distributor_init.py", line 34, in <module>
    from . import _mklinit
ImportError: DLL load failed: No se puede encontrar el módulo especificado.

###NOTE: this part 'DLL load failed: No se puede encontrar el módulo especificado.' basically means that it didnt find the module, sorry for the spanish.

, even though I'm in a conda environment. And that happens with every single package that comes with conda.

What can I do to make it work and why is that happening?


Viewing all articles
Browse latest Browse all 99726

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>