这是我拥有的python版本:Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32
我安装了ipython的virtualenv环境“ gl-env64”。
我可以在下面的示例中使用ipython:
(gl-env64) C:\Users\Merememories>ipython
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit
(AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: print 'hi'
hi
In [2]: exit()
但是,当我要使用jupyter notebook时,它将不会加载任何内核,并且会在cmd上输出错误。 在这里:
(gl-env64) C:\Users\Merememories>jupyter notebook
[I 05:47:37.509 NotebookApp] Using EnvironmentKernelSpecManager...
[I 05:47:37.512 NotebookApp] Started periodic updates of the kernel list (every 3 minutes).
[I 05:47:37.914 NotebookApp] Serving notebooks from local directory: C:\Users\Merememories
[I 05:47:37.914 NotebookApp] The Jupyter Notebook is running at:
[I 05:47:37.915 NotebookApp] http://localhost:8888/?token=41de95fa6efdd56621c620bc9530e6b0d6c50254a214dbbf
[I 05:47:37.915 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 05:47:37.923 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=41de95fa6efdd56621c620bc9530e6b0d6c50254a214dbbf
[I 05:47:37.927 NotebookApp] Starting initial scan of virtual environments...
[E 05:47:37.930 NotebookApp] Exception in callback <functools.partial object at 0x000000000488F5E8>
Traceback (most recent call last):
File "c:\users\merememories\gl-env64\lib\site-packages\tornado\ioloop.py", line 600, in _run_callback
ret = callback()
File "c:\users\merememories\gl-env64\lib\site-packages\tornado\stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\core.py", line 151, in _update_env_data
self._get_env_data(reload=True)
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\core.py", line 166, in _get_env_data
env_data.update(supplyer(self))
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\envs_conda.py", line 22, in get_conda_env_data
env_paths.extend(_find_conda_env_paths_from_conda(mgr))
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\envs_conda.py", line 77, in _find_conda_env_paths_from_conda
stdout=subprocess.PIPE)
File "c:\python27\Lib\subprocess.py", line 394, in __init__
errread, errwrite)
File "c:\python27\Lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
[I 05:47:39.266 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[E 05:47:39.859 NotebookApp] Uncaught exception GET /api/kernelspecs (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernelspecs', version='HTTP/1.1', remote_ip='::1', headers={'Accept-Language': 'en-US,en;q=0.9', 'Accept-Encoding': 'gzip, deflate, br', 'X-Xsrftoken': '2|3381b645|bef5560bf2504a032a601bf50430458a|1541447930', 'Host': 'localhost:8888', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://localhost:8888/tree', 'Cookie': 'username-localhost-8889="2|1:0|10:1541429747|23:username-localhost-8889|44:NTIxODg1NmI0M2JmNDhlNmI1MzRkZDNhYTMyYTBmNTg=|2daecc1054940c19b11049da19e6480dfe56d6b5ef6f849d233442effa768696"; username-localhost-8890="2|1:0|10:1541431661|23:username-localhost-8890|44:ZDZhYTc4ZTg5NTQ0NGQ1NmIwZDBmMzZlODI1N2Y2MmU=|04d1bfe43773fe6f8e41d65a3aee3675deb0976953ef6a5874157c1843b083b9"; _xsrf=2|3381b645|bef5560bf2504a032a601bf50430458a|1541447930; username-localhost-8888="2|1:0|10:1541731659|23:username-localhost-8888|44:NTkwZmJiYzBkYjNiNGQ2MDg1NjM1OWE3OGUxODIxOTc=|4a4f668c094e12d16f369a6d4495bb6e5464be18c634aa85f6cf6b68ddc163b2"'})
Traceback (most recent call last):
File "c:\users\merememories\gl-env64\lib\site-packages\tornado\web.py", line 1443, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "c:\users\merememories\gl-env64\lib\site-packages\tornado\web.py", line 2800, in wrapper
return method(self, *args, **kwargs)
File "c:\users\merememories\gl-env64\lib\site-packages\notebook\services\kernelspecs\handlers.py", line 57, in get
for kernel_name, kernel_info in ksm.get_all_specs().items():
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\core.py", line 201, in get_all_specs
specs = self.get_all_kernel_specs_for_envs()
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\core.py", line 184, in get_all_kernel_specs_for_envs
data = self._get_env_data()
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\core.py", line 166, in _get_env_data
env_data.update(supplyer(self))
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\envs_conda.py", line 22, in get_conda_env_data
env_paths.extend(_find_conda_env_paths_from_conda(mgr))
File "c:\users\merememories\gl-env64\lib\site-packages\environment_kernels\envs_conda.py", line 77, in _find_conda_env_paths_from_conda
stdout=subprocess.PIPE)
File "c:\python27\Lib\subprocess.py", line 394, in __init__
errread, errwrite)
File "c:\python27\Lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
[W 05:47:39.864 NotebookApp] Unhandled error
[E 05:47:39.865 NotebookApp] {
"Accept-Language": "en-US,en;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"X-Xsrftoken": "2|3381b645|bef5560bf2504a032a601bf50430458a|1541447930",
"Host": "localhost:8888",
"Accept": "*/*",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36",
"Connection": "keep-alive",
"X-Requested-With": "XMLHttpRequest",
"Referer": "http://localhost:8888/tree",
"Cookie": "username-localhost-8889=\"2|1:0|10:1541429747|23:username-localhost-8889|44:NTIxODg1NmI0M2JmNDhlNmI1MzRkZDNhYTMyYTBmNTg=|2daecc1054940c19b11049da19e6480dfe56d6b5ef6f849d233442effa768696\"; username-localhost-8890=\"2|1:0|10:1541431661|23:username-localhost-8890|44:ZDZhYTc4ZTg5NTQ0NGQ1NmIwZDBmMzZlODI1N2Y2MmU=|04d1bfe43773fe6f8e41d65a3aee3675deb0976953ef6a5874157c1843b083b9\"; _xsrf=2|3381b645|bef5560bf2504a032a601bf50430458a|1541447930; username-localhost-8888=\"2|1:0|10:1541731659|23:username-localhost-8888|44:NTkwZmJiYzBkYjNiNGQ2MDg1NjM1OWE3OGUxODIxOTc=|4a4f668c094e12d16f369a6d4495bb6e5464be18c634aa85f6cf6b68ddc163b2\""
}
[E 05:47:39.865 NotebookApp] 500 GET /api/kernelspecs (::1) 8.00ms referer=http://localhost:8888/tree
退出(ctrl-c)时说0个内核
[I 05:51:07.927 NotebookApp] Interrupted...
[I 05:51:07.927 NotebookApp] Shutting down 0 kernels
有什么建议吗?