当前位置:网站首页>Google colab踩坑
Google colab踩坑
2022-07-04 19:56:00 【Jay_Mapp】
1.在使用的时候,先将数据传入Google Drive中,然后在Colab中连接Google Colab
from google.colab import drive
drive.mount('/content/drive')2.进入到自己的文件夹下:
在colab中,直接这样做就可以
cd 想要进入的文件夹名字/
3.安装Anaconda来配置需要的安装包:
!wget -c https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
!chmod +x Anaconda3-5.1.0-Linux-x86_64.sh
!bash ./Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p /usr/local
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')4.Linux下Anaconda的虚拟环境创建、激活
虚拟环境创建:
!conda create -n 虚拟环境名称 python=3.7激活虚拟环境:
!source cnonda activate 虚拟环境虚拟环境被激活之后,就不用进行其他的操作了,激活了虚拟环境后,想要运行的python文件就会在这个虚拟环境下运行
安装各种依赖库时常会出现的错误有三个:
(1)Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nr4ydx_8/opencv-python/
!pip install --upgrade setuptools(2)Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ud_idlo6/opencv-python/
!python -m pip install --upgrade pip(3)ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
pip install PyYAML --ignore-installed边栏推荐
猜你喜欢

网件r7000梅林系统5g不稳定 5g信号经常掉线解决方法

哈希表、哈希函数、布隆过滤器、一致性哈希

网件r7000梅林系统虚拟内存创建失败,提示USB磁盘读写速度不满足要求解决办法,有需要创建虚拟内存吗??

Advantages of RFID warehouse management system solution

What should I do if my computer sharing printer refuses access

In the face of the same complex test task, why can the elder sort out the solution quickly? Ali's ten-year test engineers showed their skills

What are the functional modules of RFID warehouse management system solution

WinCC7.5 SP1如何通过交叉索引来寻找变量及其位置?

Gobang go to work fishing tools can be LAN / man-machine

NetWare r7000 Merlin system virtual memory creation failed, prompting that the USB disk reading and writing speed does not meet the requirements. Solution, is it necessary to create virtual memory??
随机推荐
Idea case shortcut
What are the functional modules of RFID warehouse management system solution
Advantages of RFID warehouse management system solution
GVM use
Alibaba testers use UI automated testing to achieve element positioning
LeetCode 7. Integer inversion
Some suggestions for interface design
Reinforcement learning - learning notes 2 | value learning
Golang中UTF编码和字符集
Idea restore default shortcut key
What if the WiFi of win11 system always drops? Solution of WiFi total drop in win11 system
What if the computer page cannot be full screen? The solution of win11 page cannot be full screen
WinCC7.5 SP1如何通过交叉索引来寻找变量及其位置?
Record the online bug solving list (unfinished to be continued 7/4)
软件开发过中的采购
浏览器渲染页面过程
What if the win11 shared file cannot be opened? The solution of win11 shared file cannot be opened
冰河的海报封面
Flet tutorial 07 basic introduction to popupmenubutton (tutorial includes source code)
LeetCode 871. 最低加油次数