1.pip install sklearn后显示
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
File "D:\Anaconda3\lib\site.py", line 87
USER_SITE = D:\Anaconda3\Lib\site-packages
^
SyntaxError: invalid syntax
Current thread 0x00002014 (most recent call first):
<no Python frame>
解决方法:①找到site.py中USER_SITE、USER_BASE设置如下
USER_SITE=NONE
USER_BASE=NONE
②在site.py路径前加r
eg:r"USER_SITE = D:\Anaconda3\Lib\site-packages"
2.FutureWarning: pandas.Int64Index is deprecated and will be removed ... in a future version.
解决方法:导入MultiIndex, Int16Dtype
导入方法:from pandas import MultiIndex, Int16Dtype