我启动了Spyder (Python 3.7),收到了这个警告:
C:ANACONDA3libsite-packagespandascompat_optional.py:138: UserWarning: Pandas requires version '2.7.0' or newer of 'numexpr' (version '2.6.9' currently installed). warnings.warn(msg, UserWarning)
如果我忽略它,我有时会得到内核连接错误(当/如果再次发生,我会截图)。
我尝试了pip install pandas --upgrade
,希望它能升级pandas
及其所有依赖项(包括numexpr
),但它只是删除了熊猫1.3.0而没有安装熊猫1.3.4
Collecting pandas
Downloading https://files.pythonhosted.org/packages/b8/42/977a30bfb4ce937b188e148fcfbae913a9aa6d22ea3d32fef603444eb588/pandas-1.3.4-cp37-cp37m-win_amd64.whl (10.0MB)
|████████████████████████████████| 10.0MB 1.1MB/s
Requirement already satisfied, skipping upgrade: numpy>=1.17.3; platform_machine != "aarch64" and platform_machine != "arm64" and python_version < "3.10" in c:anaconda3libsite-packages (from pandas) (1.21.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.7.3 in c:anaconda3libsite-packages (from pandas) (2.8.0)
Requirement already satisfied, skipping upgrade: pytz>=2017.3 in c:anaconda3libsite-packages (from pandas) (2019.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in c:anaconda3libsite-packages (from python-dateutil>=2.7.3->pandas) (1.12.0)
Installing collected packages: pandas
Found existing installation: pandas 1.3.0
Uninstalling pandas-1.3.0:
Successfully uninstalled pandas-1.3.0
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\users\u03132tk\appdata\roaming\python\python37\site-packages\~andas\_libs\algos.cp37-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
然后我执行pip install pandas,它成功安装了pandas 1.3.4:
print (pandas.__version__)
1.3.4
我以为这一切都很好,但我又开始收到警告。当我像上面那样做pip install numexpr --upgrade
和pip install numexpr
时,这些都消失了。但现在我的内核偶尔会无缘无故重启。我应该做些什么来弥补吗?
干杯!
尝试使用conda install
代替pip install