Jupyter 笔记本:更新 Anaconda 后,“没有名为 'google.colab' 的模块”

问题描述 投票:0回答:1

昨天我有了更新 Anaconda 的坏主意(系统要求这样做)。现在,我不能再使用 Jupyter Notebook 了:( 以下是我尝试安装驱动器时遇到的错误:

from google.colab import drive
drive.mount('/content/drive')

--

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 from google.colab import drive
      2 drive.mount('/content/drive')

ModuleNotFoundError: No module named 'google.colab'
--


(Looking at the answer to the 1st question below) I tried to re-install google.colab: "pip install google-colab", but it fails. Below is the partial output (I put "..." when I cut):
--
...
Collecting pandas~=0.24.0 (from google-colab)
  Using cached pandas-0.24.2.tar.gz (11.8 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): still running...
  Preparing metadata (setup.py): finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
  error: subprocess-exited-with-error
  
  python setup.py egg_info did not run successfully.
  exit code: 1
  
`  [324 lines of output]
  C:\Users\Asus\AppData\Local\Temp\pip-install-dnzbmumm\pandas_2bb5dd525f08419f83f59a4ca511da28\setup.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources
  C:\Users\Asus\AppData\Local\Temp\pip-install-dnzbmumm\pandas_2bb5dd525f08419f83f59a4ca511da28\setup.py:50: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
  warning: pandas\_libs\algos_take_helper.pxi:89:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
...

--

python-3.x anaconda jupyter google-colaboratory
1个回答
0
投票

同时,我卸载了Anaconda Navigator,安装了“Anaconda3-2024.02-1-Windows-x86_64”。没有区别,Jupyter Notebook 给出了与上述相同的错误。 顺便说一句,系统再次要求更新到“Anaconda Navigator 2.5.4”。在那次更新之前,一切都工作正常。 任何想法?预先感谢。

© www.soinside.com 2019 - 2024. All rights reserved.