These are chat archives for ipython/ipython

30th
Jul 2015
Roger Labbe
@rlabbe
Jul 30 2015 14:50
How does IPython decide where to write profiles? I'm in Windows 7. Docs say ~/.ipython/profile_default/, which for me should be c:\users\rlabbe\.ipython\profile_default. After a bunch of confusion as to why changes to startup files were not being recognized, I typed ipython profile create at the command line. The profiles were placed in ~\Documents\.ipython\profile_default. On my laptop (windows 8) the files are properly placed in ~\.ipython. Did I do something dumb during initial installation (both installs are Anaconda)?
Min RK
@minrk
Jul 30 2015 16:25
@rlabbe what does os.path.expanduser('~') get you on each machine?
Sylvain Corlay
@SylvainCorlay
Jul 30 2015 16:28
@minrk @takluyver did you guys consider releasing traitlets 4.1 before notebook 4.0, to have the deprecation warnings?
Min RK
@minrk
Jul 30 2015 17:08
I don't think so.
Roger Labbe
@rlabbe
Jul 30 2015 17:32
@minrk c:\users\rlabbe\Documents on the desktop
Min RK
@minrk
Jul 30 2015 17:32
that's it, then.
I'm not sure why, but that's what Python thinks is your home directory.
Can you look in os.environ and see if that value shows up anywhere?
S. Chris Colbert
@sccolbert
Jul 30 2015 17:39
expand.PNG
@rlabbe @minrk ^ expanduser on Windows
@rlabbe check your > echo %USERPROFILE%
Roger Labbe
@rlabbe
Jul 30 2015 17:41
echo %USERPROFILE% gives c:\users\rlabbe
but 'HOME' in os.environ is c:\users\rlabbe\Documents
S. Chris Colbert
@sccolbert
Jul 30 2015 17:41
there you go
Roger Labbe
@rlabbe
Jul 30 2015 17:43
Ya, I should have realized - it is set in my environment variables that way; not sure why.
Now that i know I can deal with it. Thanks everybody
S. Chris Colbert
@sccolbert
Jul 30 2015 17:43
is it a work machine? if so, IT probably set it up that way
Roger Labbe
@rlabbe
Jul 30 2015 17:44
No, home, no one to blame but myself.
Randy Zwitch
@randyzwitch
Jul 30 2015 18:08
Any folks who know the inner workings of IJulia here?
Min RK
@minrk
Jul 30 2015 18:08
@randyzwitch a little bit
Randy Zwitch
@randyzwitch
Jul 30 2015 18:10
I've got a corner case that I'm not sure where this fits...I'm maintaining the Vega.jl package and want to have the plots inline in the Jupyter Notebook. I want to understand the appropriate way to load d3.js and vega.js only when a user types using Vega in a Jupyter Notebook
Currently, vega1 works, but vega2 doesn't, so I'm not sure if my problem is in Julia, Jupyter or Vega!
This works to display vega 1 plots inline, but swapping out the vega library for 2.0 does not https://github.com/johnmyleswhite/Vega.jl/blob/master/src/render.jl
So any help/hints anyone could provide would be much appreciated
Min RK
@minrk
Jul 30 2015 18:14
Hm, that might be outside my expertise.
Randy Zwitch
@randyzwitch
Jul 30 2015 18:14
Ok, thanks. Like I said, not even sure where this fits, since it's at the intersection of 3 different technologies :)
Will Whitney
@willwhitney
Jul 30 2015 19:56
what's the best way to go about installing ipykernel for development? docs seem a little lacking atm
Min RK
@minrk
Jul 30 2015 20:13
From ipykernel: pip install --pre -e .
(The --pre will only be needed while we haven't released IPython 4. Once that's done, it will never be needed again)
(and --pre isn't needed if you already have IPython from master)
Will Whitney
@willwhitney
Jul 30 2015 20:19
cool
and then all ipython commands will use that version?
Min RK
@minrk
Jul 30 2015 20:22
the kernel will, yes
That's just the kernel package, if you need to work on the IPython package as well, you will do pip isntall -e . there, too.
Will Whitney
@willwhitney
Jul 30 2015 20:23
yup, that's what I meant
thanks for the help!
Min RK
@minrk
Jul 30 2015 20:24
In general, for everything it's pip install -e . The --pre part is a temporary bit that's only necessary if you are working on one of the pieces that depends on IPython 4 and not working on IPython itself as well, and only during the next few days or so while IPython 4 hasn't shipped.
Will Whitney
@willwhitney
Jul 30 2015 20:25
makes sense
Anton Akhmerov
@akhmerov
Jul 30 2015 21:27
I've a problem running tests on nbconvert. After cloning into a clean 3.4 environment, and pip install --pre -e . nosetests gives ImportError: No module named nbformat. Any idea what it could be?
Min RK
@minrk
Jul 30 2015 21:35
@akhmerov what do you get from pip list?
Anton Akhmerov
@akhmerov
Jul 30 2015 21:38
decorator (4.0.2)
functools32 (3.2.3.post2)
ipython-genutils (4.0.0.dev1)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter-core (4.0.2)
MarkupSafe (0.23)
mistune (0.7)
nbconvert (4.1.0.dev0, /home/ton/src/test/nbconvert)
nbformat (4.0.0)
pip (7.1.0)
Pygments (2.0.2)
setuptools (18.0.1)
traitlets (4.0.0)
wheel (0.24.0)
Min RK
@minrk
Jul 30 2015 21:39
That says you do have nbformat.
Anton Akhmerov
@akhmerov
Jul 30 2015 21:39
Yep.
Min RK
@minrk
Jul 30 2015 21:39
Ah, are you using an env?
Anton Akhmerov
@akhmerov
Jul 30 2015 21:40
Yes
Min RK
@minrk
Jul 30 2015 21:40
You don't have nose in the env.
Anton Akhmerov
@akhmerov
Jul 30 2015 21:40
Damn!
Thanks :D
Min RK
@minrk
Jul 30 2015 21:40
So running nose is using Python outside the env
Anton Akhmerov
@akhmerov
Jul 30 2015 21:41
got it; next problem: ImportError: No module named IPython.core.interactiveshell
Min RK
@minrk
Jul 30 2015 21:42
pip install -e ".[test]"
Anton Akhmerov
@akhmerov
Jul 30 2015 21:48
Thanks, that was it.