Anaconda (Python) - Cmder integration on Windows 10

余生颓废 提交于 2020-01-23 08:32:11

问题


I'm having some troubles in having Cmder working with Python through Anaconda on Windows 10 64bit.

I got Anaconda working pretty well, tested to plot something with matplotlib and it works just great with Anaconda Prompt. However, if I try to run the same .py file under Cmder, I got the following error:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
    from . import multiarray
ImportError: DLL load failed: The specified module could not be found.

I guess it has something to do with the path of the environment vars, but I have already added to the path the following:

  1. C:\ProgramData\Anaconda3\
  2. C:\ProgramData\Anaconda3\Scripts\
  3. C:\ProgramData\Anaconda3\Lib\

Any hints?

Thanks


回答1:


Assume your Anaconda3 installation path is C:\ProgramData\Anaconda3. On your Cmder settings StartupTasks, add a new predefined tasks

name:

whatever

and command:

cmd /k ""%ConEmuDir%\..\init.bat"" & C:\ProgramData\Anaconda3\Scripts\activate.bat C:\ProgramData\Anaconda3

To find the Anaconda path use the following command on Anaconda Prompt:

where anaconda

For example C:\ProgramData\Anaconda3\Scripts\anaconda.exe, the path will be C:\ProgramData\Anaconda3




回答2:


That probably works great for Anaconda3 but

For Anaconda 2

cmd /k ""%ConEmuDir%\..\init.bat"" & C:\{PATH_TO}\Anaconda2\Scripts\activate.bat C:\{PATH_TO}\Anaconda2


来源:https://stackoverflow.com/questions/54959918/anaconda-python-cmder-integration-on-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!