These are chat archives for spyder-ide/public

16th
Nov 2018
MANJUSHREE17
@MANJUSHREE17
Nov 16 2018 05:47
how to read a dicom image from a folder?
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 05:51
Try PyDicom? This isn't directly Spyder-related so I have no idea, but it was the first hit from searching for it.
In the future, Google is your friend :)
Randy Eckman
@emanspeaks
Nov 16 2018 15:58
Does anyone know why we are restricted to PyLS 0.19.0 for now? or has whatever the problem was with newer versions been fixed?
arnuld
@arnuld
Nov 16 2018 15:58

Hey Guys, I installed Spyder 3.3.1 and ran into issues with conda environment. I have already read official method but it does not work:

https://github.com/spyder-ide/spyder/wiki/Working-with-packages-and-environments-in-Spyder#the-modular-approach

I have created geospatial environment. All libraries are installed in this environment while Spyder is installed in primary/main environment. I am not able to run spyder ipython console connected to the geospatial environment. Even though spyder-kernel is installed and Python interprter path is pointing to geospatial environment's python
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:03
@emanspeaks, I think PyLS is crashing on Windows (or at least it's crashing for us) in 0.20 and 0.21
Jean-Sébastien Gosselin
@jnsebgosselin
Nov 16 2018 16:04
@ccordoba12 PyLS 0.21 is crashing, 0.20 is not crashing, but it's not working either...
Jean-Sébastien Gosselin
@jnsebgosselin
Nov 16 2018 16:09
@arnuld Do you get any error or anything when trying to connect?
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:11
@arnuld, what happens when you run python -m spyder_kernels.console in a terminal with your geospatial env activated?
arnuld
@arnuld
Nov 16 2018 16:11
@jnsebgosselin Yes. I get this --> https://i.stack.imgur.com/1qa83.png
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:12
@arnuld, that means you have the wrong version of spyder-kernels installed
Follow the instructions in the message to install the right one
arnuld
@arnuld
Nov 16 2018 16:13
@ccordoba12 that version does not exist in conda-forge packages
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:13
Which version?
arnuld
@arnuld
Nov 16 2018 16:14
conda has only one version called spyder-kernels but let me check
@ccordoba12 I get a kernel ID with "python -m spyder_kernels.console" and I can use this ID in "Console -> Connect to an existing kernel" and console runs fine then

I got severla versions:

0.2.0
0.2.3
0.2.4
0.2.6

then 10 more versions of 1.0

which one you want me to use ? Spyder says 0.* .. that could mean anything
Jean-Sébastien Gosselin
@jnsebgosselin
Nov 16 2018 16:19
You need to use a version that is below 1.0
arnuld
@arnuld
Nov 16 2018 16:19
ok. Lets see how it works
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:23
The asterisk in 0.* will install the highest one that's less than 1.0. It's a wildcard
arnuld
@arnuld
Nov 16 2018 16:25
I am using Linux for a long time, I thought wildcard meant install all versions starting with 0. :D
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:25
@arnuld 0.* is the precise conda version specification for the versions that will work, and you should be able to just simply run the given command in the desired environment, as the error message states to, to get a compatible version. Did that not work?
arnuld
@arnuld
Nov 16 2018 16:25
it works :)
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:25

I thought wildcard meant install all versions starting with 0

That's exactly what it means. =

Carlos Cordoba
@ccordoba12
Nov 16 2018 16:26

it works :)

Nice!!

arnuld
@arnuld
Nov 16 2018 16:26
I installed 0.2.6
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:26
Yep, that's the latest one. It's fine :+1:
arnuld
@arnuld
Nov 16 2018 16:26
so, error message was trying to tell me something .. I could not understand its language
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:27

it works :)

Okay, excellent! So, in order to better help future users, was there a particular reason why you weren't able to simply read the error message given and run the given command following the instructions there? Was there something unclear about it?

arnuld
@arnuld
Nov 16 2018 16:28

Yeah, 2 reasons:

1) I thought by it meant, install one of those, not install all of those. It is kind of misinterpretation. Generally "rm " removes all files in Linux, it does not remove one of *.

2) It looked like it as giving me a command to run. it wasn't

conda install spyder-kernel=0.*

looks more like a direct command

coda install spyder-kernel= [any version < 1.0] would have made more sense
or just [v < 1.0] etc
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:31

conda install spyder-kernel=0.*

This is a command

arnuld
@arnuld
Nov 16 2018 16:31
its not.
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:31
...
...
arnuld
@arnuld
Nov 16 2018 16:31
command is "conda install spyder-kernel=0.2.6"
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:31
No
image.png
arnuld
@arnuld
Nov 16 2018 16:32
this command does not work
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:32
That's literally the command right there. You just have to copy and paste. I think you're overthinking it :)
With what error?
arnuld
@arnuld
Nov 16 2018 16:32
conda does not install anything with that command
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:33
With what message exactly? Screenshot?
arnuld
@arnuld
Nov 16 2018 16:33
how did you put that image in chat window ?
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:33
Paste
You might need it open it in a new window for it to work with some browsers.
arnuld
@arnuld
Nov 16 2018 16:33
ok. wait
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:33
Here's the direct link
Jean-Sébastien Gosselin
@jnsebgosselin
Nov 16 2018 16:34
image.png
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:34
image.png
@jnsebgosselin You misspelled it (missing the s) just like that poor guy with Spyder lol :P
Jean-Sébastien Gosselin
@jnsebgosselin
Nov 16 2018 16:35
@CAM-Gerlach lol I copied from Carlos!
arnuld
@arnuld
Nov 16 2018 16:36

oh no ....

and I don't even drink

CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:36
xD
I didn't even sleep
arnuld
@arnuld
Nov 16 2018 16:36
:-D
I got one more problem. Displaying graphics inline ( of packages like folium, geopot etc.) let me re-check it once If I did that un-drunken mistake before I ask for help
:o)
CAM Gerlach
@CAM-Gerlach
Nov 16 2018 16:42

Displaying graphics inline ( of packages like folium, geopot etc.)

I'm not directly familiar with them so I'm not sure if they'd work if they don't at least use the matplotlib infrastructure. But if you set a different graphics backend in the Spyder preferences, that might fix it I'd guess.

arnuld
@arnuld
Nov 16 2018 16:51
Well, I was not un-drunk
Becuase matplotlib works fine there. t puts inline graphics but any non-matplotlib thing does not work (folium e.g.)
geopandas works because its backe-end is matplotlib
I thought I will use Spyder is a quite fast, productive development environment for Data Visualization because I use lot of charts/maps
Carlos Cordoba
@ccordoba12
Nov 16 2018 16:54
@arnuld, I think folium generates HTML/Javascript content, so it can't be rendered directly in our consoles. We need a dedicated pane for that
We'll try to build it next year (perhaps for Spyder 4.1)
arnuld
@arnuld
Nov 16 2018 16:54
yeah. It puts out SVG, ipython does not understand that but a web-browser does
@ccordoba12 4.1 ... that's so nice of you :)
I think I should try out Emacs + Jupyter Notebook as my environment to work in
Jupyter cells... make me so slow though