0

我启动了 Spyder (Python 3.7) 并收到了这个警告:

C:\ANACONDA3\lib\site-packages\pandas\compat\_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),但它只是删除了 pandas 1.3.0 而没有安装 pandas 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:\anaconda3\lib\site-packages (from pandas) (1.21.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.7.3 in c:\anaconda3\lib\site-packages (from pandas) (2.8.0)
Requirement already satisfied, skipping upgrade: pytz>=2017.3 in c:\anaconda3\lib\site-packages (from pandas) (2019.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in c:\anaconda3\lib\site-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 --upgradepip install numexpr。但是现在我的内核偶尔会无缘无故地重新启动。我应该做些什么来解决这个问题吗?

干杯!

4

0 回答 0