Arm*_*sMG 2 python package anaconda visual-studio-code
我是机器学习新手,我试图习惯 VS Code,所以我尝试使用它,但很快遇到了一些问题(不知道如何在终端上运行 python、使用 conda 环境等)。主要问题是我的 anaconda 包在 VS Code 中不起作用。
\n\n我已经尝试了一切,但无法在终端中运行它。我将用这个例子来解释自己。
\n\n示例代码:
\n\n#Not my actual code, but it\'s an example\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n\nx = np.linspace(0, 20, 100)\nplt.plot(x,np.sin(x))\nplt.show()\n
Run Code Online (Sandbox Code Playgroud)\n\n当我运行它时,\n这会显示在终端中
\n\nTraceback (most recent call last):\n File "c:/Users/arman/Desktop/Untitled-1.py", line 2, in <module>\n import numpy as np\n File "C:\\Users\\arman\\Anaconda3\\lib\\site-packages\\numpy\\__init__.py", line 140, in <module>\n from . import _distributor_init\n File "C:\\Users\\arman\\Anaconda3\\lib\\site-packages\\numpy\\_distributor_init.py", line 34, in <module>\n from . import _mklinit\nImportError: DLL load failed: No se puede encontrar el m\xc3\xb3dulo especificado.\n\n###NOTE: this part \'DLL load failed: No se puede encontrar el m\xc3\xb3dulo especificado.\' basically means that it didnt find the module, sorry for the spanish.\n
Run Code Online (Sandbox Code Playgroud)\n\n,即使我处于 conda 环境中。conda 附带的每个包都会发生这种情况。
\n\n我该怎么做才能让它发挥作用?为什么会发生这种情况?
\n