These are chat archives for spyder-ide/public

8th
Dec 2018
jaijaimonjacob
@jaijaimonjacob
Dec 08 2018 02:32
could u please advice me how to install caffe in spyder environment
jaijaimonjacob
@jaijaimonjacob
Dec 08 2018 02:33
thank you
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 03:09
I'm sure none of this is news to the experienced but I am enjoying playing with Spyder and Spyder-Notebook sharing the same kernel in the same UI. Import data into a notebook, interact with and modify it in Spyder's inspector, have it available immediately in the notebook. Write bad code in notebook, debug, document, and extend it in Spyder, and put it back in Notebook if/when it makes sense (e.g. interactive Bokeh graphics,) get full math rendering in Sympy, etc. And vice versa. The debugger does some different things in a shared kernel but it is still usable. Whether it is good practice or not, notebook as a turboconsole is helping me with getting things done when I need to use Python.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 03:20

interactive Bokeh graphics

FYI, based off your original feedback and suggestions we've opened an issue, spyder-ide/spyder#8367 , to create a Viewer pane in Spyder that allows you to display and interact with HTML/CSS/JS-based visualizations and output in a rendering environment that emulates what packages expect in Jupyter. Plots or other content that require it, like Bokeh, would be automatically directed to the Viewer, and potentially Spyder plugins or Python packages could utilize it in other ways to display visuals or data with lower overhead than a full native GUI. Feel free to track it there and contribute your input as you see fit. Therefore, you hopefully won't need Jupyter for this in the future.

get full math rendering in Sympy

Oh, does this not work? So long as you open a Sympy console or enable Sympy support in the preferences, you should get the full Sympy rendering experience just like Jupyter, at least to my understanding.

Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 03:33
Thanks for considering a new feature! Also, I wasn't aware that there was Sympy support built in. I'll check it out. I'm in an odd position of advocating for Jupyter notebooks but it pairs well with Spyder for my needs so I felt I should acknowledge it. By the by, I have installed Spyder Reports but I am not sure how to learn to use it. I Do I read Pweave docs, Pandoc docs, ... ?
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 03:40

Do I read Pweave docs, Pandoc docs, ... ?

Its built on pweave (itself based on Sweave/knitr for R, which I've used fairly extensively and has been my main remaining reason to use R/Rstudio over Python/Spyder nowadays). However, the Spyder UI is fairly basic, so check out the Github page for the plugin if you haven't already which should have some basic instructions.

Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 04:26

. However, the Spyder UI is fairly basic, so check out the Github page for the plugin if you haven't already which should have some basic instructions.

I checked carefully before posting. Unless I am missing something, the project's Github page has a single .png as an example and the markdown doesn't match the rendering in that one. I checked all of the project directories and tried other searches but didn't find anything else. Perhaps the docs will come when the project restarts (ref. @ccordoba12 and https://github.com/spyder-ide/spyder-reports/issues/73). Thanks.

JamesChou2016
@JamesChou2016
Dec 08 2018 04:27
problem with using sphinx in spyder

The following error occured when calling Sphinx 1.8.1.
Incompatible Sphinx version or doc string decoding failed.

Error message:
Source directory and destination directory cannot be identical

CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:30

Perhaps the docs will come when the project restarts

That's the idea, and as the docs maintainer for Spyder I'll probably be the one to do that. I've previously offered to fund the general improvements and maintenance, but with my financial situation now that my advisor told me he temporarily lost full funding he said he had for me (again...), I'm not sure I can commit to it but it should get worked on anyway after the Spyder 4 release.

Source directory and destination directory cannot be identical

We've seen this error a while ago and I believe it was fixed, though I'm still trying to find the issue report. What version of Spyder are you using (the latest is 3.3.2)? Does it work under Sphinx 1.7.x?

JamesChou2016
@JamesChou2016
Dec 08 2018 04:32
Thanks, @CAM-Gerlach
I'm using Spyder 3.3.1. I'll try sphinx 1.7
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:33
Okay, so this was reported as spyder-ide/spyder#6549 and discussed at some length, and from our testing the problem was apparently resolved in Sphinx 1.7.5. Can you try that version specifically?
If it seems it occurs again under Sphinx 1.8.x, then we'll presumably need to implement one of the solutions discussed in that issue.
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 04:35

Perhaps the docs will come when the project restarts

That's the idea, and as the docs maintainer for Spyder I'll probably be the one to do that. I've previously offered to fund the general improvements and maintenance, but with my financial situation now that my advisor told me he temporarily lost full funding he said he had for me (again...), I'm not sure I can commit to it but it should get worked on anyway after the Spyder 4 release.

I am in no rush. I am truly sorry to hear about your loss of research funding. You're in an important field and I hope that the situation reverses itself and fast.

CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:36
So @JamesChou2016 , if you can test that (with Spyder 3.3.2, just to make sure its still a problem with the latest version) and report everything you've said here along with your OS, Python and Spyder versions that would be very helpful so we can get the problem resolved on our end if possible. Thanks!
JamesChou2016
@JamesChou2016
Dec 08 2018 04:40
okay, I'll test the issue with Spyder 3.3.2
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:41
And if you could try Sphinx 1.7.5 if it still occurs in 3.3.2, that would be super.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:47

I am truly sorry to hear about your loss of research funding. You're in an important field and I hope that the situation reverses itself and fast.

Thanks; I'll still be at least funded hourly and I should have enough from previous scholarships, science awards, and savings to keep me going at least one semester, while I apply for a big NASA grant for the next few years to properly fund my current proposal, which my advisor thinks I have a good shot at since the key researchers and higher-ups at NASA here really want to see it happen. He's also pretty sure he can line something up for the summer and there's a decent change he can scrounge more funding by fall if I can't get my own funding.

Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 04:50
Things have changed since I was in graduate school 137 years ago (although in a different field.)
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:52
Yeah, by "tablet" these days we don't mean the stone kind anymore :D
Though to be fair, I'm probably more "old school" than you by some standards—I don't have a smartphone, I work in an IDE and not Jupyter notebook like most of the kids these days, and I don't really use social media except for direct messaging and posting to organization pages.
@JamesChou2016 Thanks for your help!
JamesChou2016
@JamesChou2016
Dec 08 2018 04:55
Got it! By the way, thank you provide such an extraordinary software. It is very helpful for scientific research.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:55
<3
So did Spyder 3.3.2 fix the issue? Or did Sphinx 1.7.5?
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 04:56
My dissertation weighed in at 2653 lbs; every character hand-chiselled and the recesses flecked with my blood... But we were happy in them days...
JamesChou2016
@JamesChou2016
Dec 08 2018 04:57
I find it that Spyder 3.3.2 works for Sphinx 1.8.X
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:57
Wow, and I thought the stories of walking 10 miles to school through the snow were impressive enough!
JamesChou2016
@JamesChou2016
Dec 08 2018 04:57
and SPyder 3.3.1 for Sphinx 1.7.X
sorry for my misspelling
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:58
@JamesChou2016 Great! I was probably fixed somewhere then without me noticing.
JamesChou2016
@JamesChou2016
Dec 08 2018 04:59
Maybe, thanks for your help!
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 04:59
Sure! Good luck and happy Spydering!
enes furkan
@enesfrkan_twitter
Dec 08 2018 13:22
couldn't able to find a documentation about libraries and their own codes inside, such as specific random commands and their expressions, what its parameters do etc. Is there any?
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 16:09
@enesfrkan_twitter Some libraries, like Pandas, have very complex structures or a lot of functions with C/Fortran/Cython/etc. code, which can't be introspected statically (i.e. in the Editor), which is ultimately due to the package design and not Spyder. Try importing them and introspecting them in the Console instead. However, if you can't get introspection results for any libraries or functions, then most likely there's something going on with one of the third-party completion/introspection libraries Spyder uses to get completions and documentation. We're working to make this much more reliable in Spyder 4, but in the meantime there are a number of fixes if that's the case—restart Spyder, update to the latest version, update to the latest versions of jedi, rope and parso, downgrade them to the versions in the latest Anaconda metapackage, remove enum34, etc.
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 17:43
Is there a pointer for the Spyder 3.3.1 returning "Unable to load page" for links in the online help window? pydoc is installed and I have read above that it is not a Spyder issue. Is there some other glue package that connects these two or a preference setting I may have missed? 3.3.2 has an issue with the notebook plugin so I don't want to update.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 18:05
3.3.2 has it as well, I can confirm. I'm currently working to isolate the problem to a specific Spyder and/or Python version, since pydoc is in the standard library.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 18:15
I don't know if any of the core devs actually use it, since you cant just use the normal Help instead, and IIRC its been removed from Spyder 4 since especially with the improvements its mostly redundant with the latter, though I'd really like links and forward/back buttons in normal Help like Rstudio has; it already remembers your searches; it would just be matter of implementing the UI and perhaps keeping track of the "forward" direction.
Anyway, I tested it and the problem is present as far back as Spyder 3.2.6 and Python 3.6.5, so I'm not sure what's the ultimate cause. Unfortunately I doubt there will be much work on it since development on the 3.x branch has largely wrapped up to focus on Spyder 4, which removed the pane entirely.
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 18:20
Ok. I'll disable that pane from my standard view. I have only dabbled with RStudio enough to like its UI but I've used Matlab's documentation frame extensively and appreciated having it.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 18:27
Yeah, the intended replacement is the normal "Help" pane and hitting the help hotkey (I map it to F1 myself; I loath most of the default shortcuts and find many them generally illogical, difficult to press, inconsistent with other applications and just plain unintuitive) when typing or clicking on a name in the editor or console, or by enabling the "Automatic Connections" feature which automatically opens the help docs for functions, etc. as you type.
enes furkan
@enesfrkan_twitter
Dec 08 2018 18:37
@CAM-Gerlach i've been practicing on Codeskulptor for a while, due to its offline feature, thought that i'd proceed on Spyder like i did in codeskulptor you know documentation's just a click away there. Not all of libraries, but needed.
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 18:38
Oh, brother... I just now saw that there are two different panes available; Help and Online Help. I was only trying the latter. The former does work for many things. I am able to call up documentation from the editor with the Cmd+I shortcut as described in the opening Help screen. Can this Help window be made to show basic Python syntax help; e.g. def, for, class, and such or is it meant for the more complicated stuff like numpy?
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 18:44

you know documentation's just a click away there

@enesfrkan_twitter So to in Spyder, with the Help pane. Just put your cursor near the name of a function, method, class, module, etc. or type its name, hit the help hotkey and Spyder should retrieve and render the full rich-text documentation. You can also type the name of the object you want help on into the help pane (in dynamic/Console mode), and if you enable the Automatic Connections feature in Preferences > Help, Spyder will display the appropriate documentation as you type in the Editor or Console; e.g. type np.array( and Spyder will display the np.array docs for you.

CAM Gerlach
@CAM-Gerlach
Dec 08 2018 18:56

Can this Help window be made to show basic Python syntax help; e.g. def, for, class, and such

It will show you help on any builtins (open(), input(), etc) and any other functions, classes, modules, methods, etc—anything with a docstring—but the few things like def, for/while, if/elif/else, and try/except/finally are keywords and are part of the core language itself, so they don't have docstrings and rather its reasonably expected that you have at least read a very introductory tutorial to the language (a number of resources to which we link to in our Help menu).

Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 19:47
Fair enough. Sometimes fine points of syntax leak away when one uses a language sporadically. I'll make up a cheat sheet.
CAM Gerlach
@CAM-Gerlach
Dec 08 2018 20:11
This is more or less the canonical one, and is what I used when I was first switching to Python from R a year and a half ago.
Old Guy in the Club
@OldGuyInTheClub
Dec 08 2018 22:19
Very nice. It has the items I most frequently forget. Downloaded.