未了解原因:
1、直接用管理员权限进入黑窗口,未进行任何操作显示错误:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Anaconda3\lib\ctypes\__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: No module named '_ctypes'
Traceback (most recent call last):
File "D:\Anaconda3\lib\site-packages\conda\cli\main.py", line 170, in main
import conda.cli.activate as activate
File "D:\Anaconda3\lib\site-packages\conda\cli\activate.py", line 10, in <module>
from ..exceptions import (ArgumentError, CondaEnvironmentError, CondaSystemExit, CondaValueError,
File "D:\Anaconda3\lib\site-packages\conda\exceptions.py", line 16, in <module>
from .common.url import maybe_unquote
File "D:\Anaconda3\lib\site-packages\conda\common\url.py", line 8, in <module>
import socket
File "D:\Anaconda3\lib\socket.py", line 49, in <module>
import _socket
ImportError: No module named '_socket'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\Scripts\conda-script.py", line 10, in <module>
sys.exit(main())
File "D:\Anaconda3\lib\site-packages\conda\cli\main.py", line 177, in main
from ..exceptions import handle_exception
File "D:\Anaconda3\lib\site-packages\conda\exceptions.py", line 16, in <module>
from .common.url import maybe_unquote
File "D:\Anaconda3\lib\site-packages\conda\common\url.py", line 8, in <module>
import socket
File "D:\Anaconda3\lib\socket.py", line 49, in <module>
import _socket
ImportError: No module named '_socket'
在上述情况打开黑窗口或不用管理员权限,在文件夹直接打开黑窗口,pip无任何异常,可用。但是conda任何命令不可用,显示failed to create process。在网上查了很多有关的解决方案都没奏效,最后没办法只能卸载Anaconda3,再重新安装,才得以解决。如果你知道这是为什么,求不卸载Anaconda3的解决方案。