question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ipython won't start

See original GitHub issue

Now I’m facing that ipython won’t start without any error messages. I tried to run it with DEBUG, then the command will be “uninterruptible sleep” after the logs.

$ pyenv global system
$ python --version
Python 2.7.5
$ ipython --version
6.2.1
$ ipython --log-level=DEBUG
[TerminalIPythonApp] IPYTHONDIR set to: /users/yanagisawa/.ipython
[TerminalIPythonApp] Using existing profile dir: '/users/yanagisawa/.ipython/profile_default'
[TerminalIPythonApp] Searching path ['/users/yanagisawa', '/users/yanagisawa/.ipython/profile_default', '/usr/etc/ipython', '/usr/local/etc/ipython', '/etc/ipython'] for config files
[TerminalIPythonApp] Attempting to load config file: ipython_config.py
[TerminalIPythonApp] Looking for ipython_config in /etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /usr/local/etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /usr/etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /users/yanagisawa/.ipython/profile_default
[TerminalIPythonApp] Loaded config file: /users/yanagisawa/.ipython/profile_default/ipython_config.py
[TerminalIPythonApp] Looking for ipython_config in /users/yanagisawa

Another system also has the same problem

$ pyenv global anaconda3-2018.12
$ python --version
Python 3.7.1
$ ipython --version
7.2.0
$ ipython --log-level=DEBUG
ipython --log-level=DEBUG
[TerminalIPythonApp] IPYTHONDIR set to: /users/yanagisawa/.ipython
[TerminalIPythonApp] Using existing profile dir: '/users/yanagisawa/.ipython/profile_default'
[TerminalIPythonApp] Searching path ['/users/yanagisawa', '/users/yanagisawa/.ipython/profile_default', '/users/yanagisawa/.local/pyenv/versions/anaconda3-2018.12/etc/ipython', '/usr/local/etc/ipython', '/etc/ipython'] for config files
[TerminalIPythonApp] Attempting to load config file: ipython_config.py
[TerminalIPythonApp] Looking for ipython_config in /etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /usr/local/etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /users/yanagisawa/.local/pyenv/versions/anaconda3-2018.12/etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /users/yanagisawa/.ipython/profile_default
[TerminalIPythonApp] Loaded config file: /users/yanagisawa/.ipython/profile_default/ipython_config.py
[TerminalIPythonApp] Looking for ipython_config in /users/yanagisawa

It should be noted that It is on a cluster machine, not own PC. I guess it is related to permission problems thus far (without any reasons).

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jhayes-pycommented, Sep 3, 2019

It looks like the problem has been previously addressed, as the following comment can be found in jupyter_core/dotipython/profile_default/ipython_config.py:

## Path to file to use for SQLite history database.
#
#  By default, IPython will put the history database in the IPython profile
#  directory.  If you would rather share one history among profiles, you can set
#  this value in each, so that they are consistent.
#
#  Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
#  If you see IPython hanging, try setting this to something on a local disk,
#  e.g::
#
#      ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
#
#  you can also use the specific value `:memory:` (including the colon at both
#  end but not the back ticks), to avoid creating an history file.

We were having the aforementioned NFS problem, and IPython did not hang when I used the example command. In our case, the ultimate solution was to update our NFS to version 4.x. Is there any way to catch this problem and return a descriptive error message, instead of hoping someone will read the entirety of ipython_config.py for an answer?

0reactions
jacobmatthewmurraycommented, Nov 17, 2021

A solution without updating NFS, alias-ing or symlinking based on this:

ipython profile create


# Edit IPython configuration
vi ~/.ipython/profile_default/ipython_config.py

# Change following two lines
# c.HistoryManager.hist_file=''
# c.HistoryAccessor.hist_file=''

# To:
c.HistoryManager.hist_file=':memory:'
c.HistoryAccessor.hist_file=':memory:' 


jupyter notebook --generate-config

# Edit Jupyter configuration
vi ~/.jupyter/jupyter_notebook_config.py

# Change following line
# c.NotebookNotary.db_file = ''

# To:
c.NotebookNotary.db_file = ':memory:'

Read more comments on GitHub >

github_iconTop Results From Across the Web

IPython won't start - Stack Overflow
I'm running Windows 7 x64. I installed the 32x verson of Python 2.7.2 and IPython 0.11 using the Windows Installers. They installed all...
Read more >
What to do when things go wrong - The Jupyter Notebook
Jupyter doesn't load or doesn't work in the browser · Try in another browser (e.g. if you normally use Firefox, try...
Read more >
FAQ - IPython
IPython crashes under OS X when using the arrow keys​​ Under some circumstances, using the arrow keys to navigate your input history can...
Read more >
Jupyter notebook browser page not loading
Running on windows 10, if I type jupyter notebook in a command prompt then I see ... However, when I try to open...
Read more >
How to Fix Kernel Error in Jupyter Notebook
Most kernel errors are often brought about by the failure of the Notebook to connect with other versions of Python. By default, there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found