Display pyplot windows using Anaconda + Sublime

I installed the Anaconda distribution on Windows and got it working with Sublime Text 2. Now I can press ctrl + B to run the scripts and after using pip to install the necessary packages I finally have no ImportErrors. Unfortunately, Matplotlib charts will not be displayed no matter what I do.

The most promising answer was on this page . I edited% appdata% \ Roaming \ Sublime Text 2 \ Packages \ Python \ Python.sublime-build to look like this:

{
    "cmd": ["C:\\Anaconda\\python.exe", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python",
    "shell": true
}

However, he did nothing, and the quotation marks around the "truth" did not matter.

I used to call "ipython --pylab" in the console to enable Pyplot windows, so I tried changing the first line like this:

"cmd": ["C:\\Anaconda\\Scripts\\ipython.exe", "--pylab", "$file"]

% AppData%\Roaming\Sublime Text 2\Packages\User :

// startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW

, . - ?

!

+4
1

OP:

. , , :

matplotlib.pylab.show(block=False)
+3

Source: https://habr.com/ru/post/1541251/


All Articles