当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
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
看腾讯大老如何做接口自动化测试
Summary of the mistakes in the use of qpainter in QT gobang man-machine game
HMS Core 统一扫码服务
JS closure
剑指 Offer II 80-100(持续更新)
接口設計時的一些建議
阿里云国际版CDN的优势
acwing 3302. 表达式求值
go语言笔记(4)go常用管理命令
GVM使用
PermissionError: [Errno 13] Permission denied: ‘data.csv‘
卷积神经网络在深度学习中新发展的5篇论文推荐
浏览器渲染页面过程
【1200. 最小绝对差】
五子棋 上班摸鱼工具 可局域网/人机
【解决方案】PaddlePaddle 2.x调用静态图模式
基于OpenCV haarcascades的对象检测
uniapp 富文本编辑器使用
What is the development of block hash quiz game system? Hash quiz game system development (case mature)