Windows,Linux及python的一些命令

目录

正常的pip命令

pip install h5py==2.9.0 --user -i https://pypi.douban.com/simple/ ## 添加镜像源并且设置版本和管理员模式运行
pip list ## 列出当前第三方库及其版本

conda环境下命令

Linux,gitbash命令

要运行Linux命令行可以在gitbash下运行

git clone https://github.com/tensorflow/models.git  ## 把git地址放到后面

Google的colab命令

from google.colab import drive
drive.mount('/content/drive')
# 指定当前的工作文件夹
import os
# 此处为google drive中的文件路径,drive为之前指定的工作根目录,要加上
os.chdir("/content/drive/My Drive/first/colab") 
%tensorflow_version 1.x  ## colab默认的TensorFlow为1.x版本,要使用2.x不用重新安装,只需在导入tensorflow之前输入%tensorflow_version 2.x
!python tfrecord.py   ## 运行所有的命令都加个感叹号就可以了
上一篇:OpenStack实践(十):Cloud Init+Config Drive定制实例


下一篇:AIX 输入lsdev -Cc disk 报错 lsdev: 0514-521 Cannot find information in the predefined device