The juputer installed on linux, the kernel of the started juputer died due to the mv installation path to /data/
Therefore, the python program in juputer cannot be run
Solution:
cd 移动后的anoconda的安装路径
vim share/jupyter/kernels/python3/kernel.json
Modify the path inside:
Modify the correct path of python as follows:
{
"argv": [
"/移动的anconda新路径/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}
Of course, if you use jupyter-notebook --allow-root --no-browser --ip=0.0.0.0 to start juputer, there is a path error, you need to modify the path
before:
#!/anconda安装路径/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from notebook.notebookapp import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
after:
#!/移动的anconda新路径/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from notebook.notebookapp import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Because this is needed by the interpreter, it can be called to python correctly after modification