PyDev/Eclipse not loading _mklinit when run from a Conda environment

前端 未结 5 1876
借酒劲吻你
借酒劲吻你 2020-12-18 08:24

I created a conda environment - testenv2 - installed python/numpy/pandas. Added it as the interpreter in Eclipse project settings and using it to run my test python script.

相关标签:
5条回答
  • 2020-12-18 08:55

    Add DLL location (C:\Programs\Python\Python35\DLLs) in the Environment variables path. This worked for me.

    0 讨论(0)
  • 2020-12-18 08:56

    Add CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 to your environment variables.

    For VSCode, either an .env file in your workspace folder or "env" key in launch.json should do the trick.

    Source: https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#numpy-mkl-library-load-failed

    0 讨论(0)
  • 2020-12-18 09:02

    I have to put following into my path environment variable: E:\program\Anaconda3\Library\bin , otherwise I got the same problem.

    0 讨论(0)
  • 2020-12-18 09:09

    Here you can find the section of the troubleshooting page for conda related to your issue and I think the inactive environment is the problem here.

    With the latest conda version the developers decided that instead of polluting your environment variables with their paths you need to ensure your environment is activated when performing any action in it, otherwise things like required DLLs will not be found.

    Current IDEs have not necessarily adapted to that change yet, I myself can't use integrated Python consoles in PyCharm because it tries to run it without activating the environment beforehand. Apparently the issue should be fixed in the next release.

    Anyways, if you can't make your IDE activate conda environments before running any commands, you'll just have to bear with using ordinary terminals, where you can ensure the environment is active.

    0 讨论(0)
  • 2020-12-18 09:15

    1.First open Anaconda Powershell Prompt and run the command

    conda activate (path where you have the anaconda environment)
    

    2.then open System-->Advanced System Settings-->Environment variables

    a.in the User variable Path change the path to

    (path where you have the anaconda environment)Library\bin
    

    b.in the System variable add a new variable PYTHONPATH and give its path as

    (path where you have the anaconda environment)\Lib;(path where you have the anaconda environment)\DLLs;(path where you have the anaconda environment)\Lib\lib-tk;(Drive where you have the anaconda environment)\other-folders-on-the-path
    

    3.close eclipse and run again

    0 讨论(0)
提交回复
热议问题