ubuntu 16.04 tip
1. 安装 python3.6
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update sudo apt-get install python3.6
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
Finally switch between the two python versions for python3 via command:
sudo update-alternatives --config python3
python3 -V
bug, gnome-terminal won’t launch after step 3, a workaround is running following commands to recreate the symlink:
sudo rm /usr/bin/python3 sudo ln -s python3.5 /usr/bin/python3
2. pip3.6安装regex失败 pip3 install regex
# mysql> use your_database_name;
# mysql> source file.sql;
import and export
Export:
mysqldump -u username –-password=your_password database_name > file.sql
Import:
mysql -u username –-password=your_password database_name < file.sql
Another way to import dump files when source <filename> doesn't work is to do the following:
Dump
~> mysqldump --user=<user> --password=<password> <db_name> > <export_file_name>.sql
Import
> mysql -u <user> -p <pass> <db_name>
mysql> USE <db_name>; (if you didn't already select)
mysql> \. ~/<export_file_name>.sql
5. 更换python版本后出现 No module named "apt_pkg"
First:
How to Fix Error sudo: add-apt-repository: command not found
Then:
Error sudo: add-apt-repository: command not found [duplicate]
6. douyin 爬虫
REF:
markdown简易语法(图文并茂)
Reloading modules in Python
For >=Python3.4
import importlib
importlib.reload(module)
UnicodeEncodeError
编辑~/.bash_profile文件('~'指的是用户登录后的默认目录),添加一行:export LANG="en_US.UTF-8"
在运行python命令前添加参数 PYTHONIOENCODING=utf-8 python printcn.py
How can I set VIM's default encoding to UTF-8?
.vimrc, add set encoding=utf-8 and restart Vim.ubuntu 16.04 tip的更多相关文章
- Ubuntu 下ibus拼音输入法启用 (ubuntu 16.04
Ubuntu 下ibus拼音输入法启用 我安装的是英文版的ubuntu 16.04,打开只带英文,并没有中文. 设置输入法为iBus 从system settings 进入language suppo ...
- Ubuntu 16.04 LAMP server 指南 - 配置 Apache2.4,PHP7,和MariaDB(而不是MySQL)
翻译自:https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/ 昨天在虚 ...
- 【转】Ubuntu 16.04安装配置TensorFlow GPU版本
之前摸爬滚打总是各种坑,今天参考这篇文章终于解决了,甚是鸡冻\(≧▽≦)/,电脑不知道怎么的,安装不了16.04,就安装15.10再升级到16.04 requirements: Ubuntu 16.0 ...
- Ubuntu 16.04 安装 Kodi v17 “Krypton” Alpha 2
Ubuntu 16.04 安装 Kodi v17 “Krypton” Alpha 2:sudo add-apt-repository ppa:team-xbmc/xbmc-nightlysudo ap ...
- ubuntu 16.04安装docker
环境 操作系统:ubuntu 16.04 64位,默认安装 准备 1. 添加GPG key: $ sudo apt-key adv --keyserver hkp://p80.pool.sks-key ...
- Ubuntu 16.04安装QQ国际版图文详细教程
因工作需要,我安装了Ubuntu 16.04,但是工作上的很多事情需要QQ联系,然而在Ubuntu上的WebQQ很是不好用,于是在网上搜索了好多个Linux版本的QQ,然而不是功能不全 ...
- Ubuntu 16.04 64位 搭建 node.js NodeJS 环境
我的系统环境: Ubuntu 16.04 64位 本文内容亲测可用, 请放心食用 使用淘宝镜像 淘宝镜像官网是https://npm.taobao.org/ 使用淘宝镜像前请自行安装好 npm 和 n ...
- Ubuntu 16.04 几个国内更新源
http://blog.csdn.net/paincupid/article/details/52895676 如何更改源 1/ 在修改source.list前,最好先备份一份 执行备份命令 sudo ...
- Ubuntu 16.04 LTS发布
[Ubuntu 16.04 LTS发布]Ubuntu 16.04 LTS 发布日期已正式确定为 2016 年 4 月 21 日,代号为 Xenial Xerus.Ubuntu16.04 将是非常受欢迎 ...
随机推荐
- F - Currency Exchange
来源poj1860 everal currency exchange points are working in our city. Let us suppose that each point sp ...
- STL之pair对组
#include<iostream> #include<algorithm> #include<cstring> #include<cstdlib> u ...
- python 获取本机ip
有的设备上,有host相关配置,或者网络环境特殊,导致从hostname获取ip不符合预期. 如下函数整合了多种获取ip的方式,大部分情况都可涵盖,一般情况下可以满足需求~ 核心是创建一个UDP协议下 ...
- git 彻底删除历史记录中的大文件
Reference 大家一定遇到过在使用Git时,不小心将一个很大的文件添加到库中,即使删除,记录中还是保存了这个文件.以后不管是拷贝,还是push/pull都比较麻烦. === 删除大文件方法 方法 ...
- git 设置tracking information
There is no tracking information for the current branch.Please specify which branch you want to merg ...
- 微信原始坐标转换成百度坐标 lat lng
如有帮到你记得结合我这篇博客里的方法.... http://www.cnblogs.com/zc290987034/p/8294988.html {:wx_jssdk_config("fal ...
- Oracle课程档案,第十四天
备份数据文件:SQL> select file_id, file_name from dba_data_files; backup:备用(备份) datafile:数据文件 backup tab ...
- ZOJ 4062 - Plants vs. Zombies - [二分+贪心][2018 ACM-ICPC Asia Qingdao Regional Problem E]
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4062 题意: 现在在一条 $x$ 轴上玩植物大战僵尸,有 $n$ ...
- HDU_5528_Count a * b
Count a * b Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Tot ...
- Java随机字符串:随机数字字符串,工具类
Java中生成随机数,字符串的工具类 1. 调用方法需要传入生成字符串的长度和需要的类型 生成随机数字 生成随机字母字符串 生成随机字符串+数字等 ......... 2. 总共8种类型,具体看工具类 ...