spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.2k stars 1.59k forks source link

Clean conda Windows install, followed by 'conda update --all' results in wrong mkl dlls being used for Spyder #7357

Closed luciansmith closed 5 years ago

luciansmith commented 6 years ago

Problem Description

A clean conda install from https://www.anaconda.com/download/#windows (version 5.2.0) works for Spyder, but if I then do a 'conda update --all', the resulting configuration is broken. When you run Spyder, launching from Anaconda navigator, you get a message about a missing ordinal 242 in Anaconda3\Library\bin\mkl_intel_thread.dll

This turns out to be because the dlls from mkl-2018.0.3-1 are installed in Anaconda3\Library\bin\, but something in Spyder needs the dlls from mkl-2018.0.2-1 instead. If you copy the dlls from Anaconda3\pkgs\mkl-2018.0.2-1\Library\bin into Anaconda3\Library\bin, Spyder then launches normally. (This probably breaks something else, but if so, it's something I haven't yet tried to use ;-)

What steps reproduce the problem?

  1. Install Anaconda for Windows
  2. run conda update --all
  3. Launch Spyder

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

Dependencies

pyflakes >=0.6.0 :  2.0.0 (OK)
pycodestyle >=2.3:  2.4.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.23.1 (OK)
numpy >=1.7      :  1.14.5 (OK)
sphinx >=0.6.6   :  1.7.5 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.12.0 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.28.3 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.4.0 (OK)
pylint >=0.25    :  1.9.2 (OK)
CAM-Gerlach commented 5 years ago

Thanks @msarahan . So if that's the case, wouldn't @dolson14 have to have selected the "Add Anaconda to PATH" option in the installer in order for it to show up on the PATH (such that where would find it) at all, as it does above? @dolson14 can you confirm, as I mention above, that you've activated your environment, and whether you selected the "Add to PATH" option when installing Anaconda?

dolson14 commented 5 years ago

Ah, that actually makes sense. In fact, I tried adjusting my shell to prepend the python path directories as opposed to postpending them, and that solved the problem. Looks like activating is the better solution, so I'll look into how to do that the right way in my shell environment. Thanks!

CAM-Gerlach commented 5 years ago

@dolson14 conda activate <env-name> (e.g. base for the root env). Although, Anaconda prompt should activate base for you automatically...

dolson14 commented 5 years ago

@CAM-Gerlach that much I knew already. =) My problem is that I prefer using a different shell environment than the default Anaconda prompt; I use cmder due to its linux-like feel and that it gets bundled with ssh, git, and a bunch of other very useful tools.

For reference, in case is looking for how to do this, I just put this line into cmder/config/user-profile.cmd:

call "<path to Anaconda>\condabin\activate.bat"

That activates the python environment just by opening a terminal.

CAM-Gerlach commented 5 years ago

@dolson14 Oh, I actually do the exact same thing with ConEmu + Git Bash (= Cmdr) + a custom task config that activates my conda environment and sets up my working directory). As long as I have it set up correctly, I've never had the issue you describe, but I'm not sure why you would conclude this is an Anaconda problem when it clearly stems from how your non-standard environment is set up.

Speaking of Git Bash/Cmdr—in case you couldn't tell by his name, the guy you quoted (Ray) was actually one of the core developers behind that very MSYS2 and Git for Windows that we're discussing. @mingwandroid Any chance we get a default/bundled Anaconda prompt that calls Git Bash rather than horrible old cmd.exe at some point in the future?