linux雜記

1.pip

pip升級10.0.1以後執行python

sudo pip install

會報錯linux

ImportError: cannot import name 'Process'

查閱百度,基本都是sys.exit(main())改成sys.exit(main.main()),辦法估計全是複製粘貼,根本無用,正確解決方式:shell

from pip import main
改成
from pip._internal import main

便可正常執行pip安裝python包,若是不行,退出終端重試一下。bash

2.fish shell

fish shell 比自帶的/bin/bash好用不少,尤爲是選擇tab時,會自動列出全部輸入可能供其選擇,特別方便spa

sudo apt-get install fish

設置默認shell(3種方式).net

1.chsh -s /usr/bin/fish
2.set -g default-command /usr/bin/fish
  set -g default-shell /usr/bin/fish
3.vi /etc/passwd 把用戶默認shell由/bin/bash改爲/usr/bin/fish

重啓終端打開便可code

3.國內源更新

linux換成國內源時,提示簽名文件無效,沒法更新,apt-get update時提示server

「GPG 錯誤:http://mirrors.aliyun.com/kali kali-rolling InRelease: 下列簽名無效」

安裝簽名文件ip

apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6

4.python常見錯誤

inconsistent use of tabs and spaces in indentation:縮進錯誤
相關文章
相關標籤/搜索