Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If default profile doesn't exist, can't install mathjax to any location #4114

Closed
rgbkrk opened this issue Aug 26, 2013 · 3 comments
Closed
Milestone

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Aug 26, 2013

Fresh install of IPython, profile named 'cooked' created.

(ipyvirt)ipynb@ipynb-cookbook-berkshelf:~$ python -m IPython.external.mathjax --install-dir .ipython/profile_cooked/static/mathjax
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/ipynb/ipyvirt/lib/python2.7/site-packages/IPython/external/mathjax.py", line 65, in <module>
    static = os.path.join(locate_profile('default'), 'static')
  File "/home/ipynb/ipyvirt/local/lib/python2.7/site-packages/IPython/utils/path.py", line 354, in locate_profile
    raise IOError("Couldn't find profile %r" % profile)
IOError: Couldn't find profile 'default'

This is largely due to the global variables set at the start of IPython/external/mathjax.py.

static = os.path.join(locate_profile('default'), 'static')
default_dest = os.path.join(static, 'mathjax')
@jtriley
Copy link
Contributor

jtriley commented Oct 9, 2013

Just ran into this myself on a fresh Ubuntu 13.04 AMI.

@minrk
Copy link
Member

minrk commented Oct 9, 2013

Should be fixed by #4277.

@minrk minrk closed this as completed Oct 9, 2013
@arun057
Copy link

arun057 commented Jan 29, 2014

Still happening on my dev machine. fresh install of python.

looneydoodle$ python -c "from IPython.external import mathjax;
> mathjax.install_mathjax()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/external/mathjax.py", line 69, in <module>
    static = os.path.join(locate_profile('default'), 'static')
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/path.py", line 354, in locate_profile
    raise IOError("Couldn't find profile %r" % profile)
IOError: Couldn't find profile 'default'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants