Importing Your Own Python Module or Python File into Colab
Source from : https://medium.com/analytics-vidhya/importing-your-own-python-module-or-python-file-into-colab-3e365f0a35ec
Step 1
Primarily, you must Mount your google drive in google colab:
Code to below, your files on your google drive is import files/packages inside a google colab.
# Mount your google drive in google colab
from google.colab import drive
drive.mount('/content/drive')
Step 2
Secondly, insert the directory to your python path using sys:
# Insert the directory
import sys
sys.path.insert(0,’/content/drive/My Drive/ColabNotebooks’)
Step 3
Now, you can be able to import your module or file stuff from that directory.
# Import your module or file
import my_module
Importing Your Own Python Module or Python File into Colab的更多相关文章
- import 本地Python module或package
很基础很重要的一课,虽然很简单,但是防止以后忘了,还是记下来 这个笔记里说的都是import本地的,自己创建的,或者复制粘贴的别人的,总之“不是安装到library”的module or packag ...
- Nuke Python module的使用
最近很多脚本工作都需要脱离nuke的gui环境运行,没有了script editor就必须要尝试Nuke Python module功能了.该模式可以执行大部分在GUI环境中的命令,在自动生成或者批量 ...
- __import__ 与动态加载 python module
原文出处: koala bear Direct use of __import__() is rare, except in cases where you want to import a m ...
- the ssl module in Python is not available错误解决
在使用pip安装pymongo的过程中报错,提示如下: $ pip3 install pymongo pip is configured with locations that require TLS ...
- windows下pip安装python module失败
C:\Python27\pywin32-214>setup.py -q install Building pywin32 2.7.214.0 Traceback (most recent cal ...
- Dive into re Module in Python
Dive into RE in Python Standard re module in python is powerful to handle text manipulation,such as ...
- Python module all in one
Python module all in one Python Modules https://docs.python.org/3/tutorial/modules.html Fibonacc # F ...
- install python module
[install python module] 参考:http://docs.python.org/2.7/install/index.html
- Python队列服务 Python RQ Functions from the __main__ module cannot be processed by workers.
在使用Python队列服务 Python RQ 时候的报错: Functions from the __main__ module cannot be processed by workers. 原因 ...
- plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or di ...
随机推荐
- user define language in vscode
user define language pre-defined language are in the folder path_to_install_dir\resources\app\extens ...
- SpringBoot整合MyBatis-Plus详细使用方法
SpringBoot整合mp 一.添加依赖pom.xml <dependency> <groupId>mysql</groupId> <artifactId& ...
- jsonpath表达式
JsonPath是一种简单的方法来提取给定JSON文档的部分内容,其中正则表达式的包含或不包含配制有时候非常有用! json操作实例 { "store": { "book ...
- superset2 开发环境部署+阿里odps连接
引用:https://help.aliyun.com/document_detail/280392.htm https://blog.csdn.net/weixin_45684985/article/ ...
- 如何把高德地图搜索商家电话资料导出成excel里?
有很多人问我地图商家结果采集怎么做? 怎么样能够快速的把高德地图左边的搜索列表里的商家地图,电话,导出到EXCEL里. 如何快速地将高德地图里的商家电话资料导出EXCEL? 操作步骤: 1. 选择你要 ...
- Finance财务软件(权限管理专题)
我们支持按模块对用户授权 如上所示,我们对用户test进行授权.test登录系统后将看不到未授权的菜单:
- Win10 ISS Web服务器安装与部署
Win10 ISS Web服务器安装与部署 安装 ISS 控制面板-->程序-->启用或关闭 Windows 功能-->Internet Information Services 测 ...
- STM32-USART打印字符、字符串函数自己犯的错误反思
void UART_Send_Byte(USART_TypeDef *USARTx, uint8_t cha) { USART_SendData(USARTx, cha); while(USART_G ...
- android 集成友盟实现 第三方分享 登录(qq,新浪,微信)
其实友盟的文档写的非常详细了,在这只是记录一下开发过程中遇到过的坑. 开发流程,先到友盟的官网注册账号创建应用,友盟的文档地址:http://dev.umeng.com/social/android/ ...
- VMWare 12 Mac 10.11 XCode 7.3 Ipad真机调试重要问题总结
XCode 7.3可以不需要每年缴费而直接调试IOS应用,测试如下: 1,安装Mac 10.11在VMWare12上,网上有很多例子.注意: 1.1,虚拟机设置中USB为USB2.0,不能是3.0或其 ...