gpt4 book ai didi

python - 无法在本地安装 Google Colab

转载 作者:行者123 更新时间:2023-12-04 11:32:03 27 4
gpt4 key购买 nike

我一直在尝试在我的计算机(Windows 操作系统)上安装 google-colab 失败。
我运行“pip install google-colab”时的输出很长,但我收到的一些错误是:

> Building wheel for pandas (setup.py) ... error   ERROR: Command
> errored out with exit status 1: command:
> 'C:\Users\...\Anaconda3\python.exe' -u -c 'import sys, setuptools,
> tokenize; sys.argv[0] =
> '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-ifymdm95\\pandas\\setup.py'"'"';
> __file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-ifymdm95\\pandas\\setup.py'"'"';f=getattr(tokenize,
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> bdist_wheel -d 'C:\Users\...\AppData\Local\Temp\pip-wheel-02i01qsx'
然后经过长时间的错误输出,最后是:
 Rolling back uninstall of pandas
Moving to c:\users\...\anaconda3\lib\site-packages\pandas-1.2.0.dist-info\
from C:\Users\...\Anaconda3\Lib\site-packages\~andas-1.2.0.dist-info
Moving to c:\users\...\anaconda3\lib\site-packages\pandas\
from C:\Users\...\Anaconda3\Lib\site-packages\~-ndas
ERROR: Command errored out with exit status 1: 'C:\Users\...\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-ifymdm95\\pandas\\setup.py'"'"'; __file__='"'"'C:\\Users\\...\\AppData\\Local\\Temp\\pip-install-ifymdm95\\pandas\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\...\AppData\Local\Temp\pip-record-67jzzkdh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\...\Anaconda3\Include\pandas' Check the logs for full command output.
任何提示或帮助将不胜感激。

最佳答案

来自 Colab's issues repo , Craig Citro(Google Colab 的软件工程师)陈述了以下内容

There's no way to run the colab frontend locally.


但是请注意,Colaboratory 允许您使用 Jupyter 连接到本地运行时。这允许您在本地硬件上执行代码并访问本地文件系统(它是具有本地运行时的 Colab 前端)。如果这是您的目标, here你可以找到一种方法来做到这一点。

Setup instructions

In order to allow Colaboratory to connect to your locally running Jupyter server, you'll need to perform the following steps.

Step 1:Install JupyterInstall Jupyter on your local machine.

Step 2: Install and enable the jupyter_http_over_ws jupyter extension (one-time)The jupyter_http_over_ws extension is authored by the Colaboratory team and available on GitHub.

pip install jupyter_http_over_ws
jupyter serverextension enable --py jupyter_http_over_ws

Step 3: Start server and authenticate

New notebook servers are started normally, though you will need to set a flag to explicitly trust WebSocket connections from the Colaboratory frontend.

jupyter notebook \
--NotebookApp.allow_origin='https://colab.research.google.com' \
--port=8888 \
--NotebookApp.port_retries=0

Once the server has started, it will print a message with the initialbackend URL used for authentication. Make a copy of this URL as you'llneed to provide this in the next step. Step 4: Connect to the localruntime

In Colaboratory, click the "Connect" button and select "Connect tolocal runtime...". Enter the URL from the previous step in the dialogthat appears and click the "Connect" button. After this, you shouldnow be connected to your local runtime.

关于python - 无法在本地安装 Google Colab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65595749/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com