pythonunbuffered_python所遇到的坑

我是在ubuntu中,自带的有python2,python3有安装了anaconda套件,所以python的版本很多,曾经想删除过不用的python.

先执行

sudo apt remove python*

在想安装anaconda,结果悲剧了,xorg没有了,结果只能cmd玩耍了,一气之下重装ubuntu18系统了

dflx@dflx:~$ ps -t tty1

PID TTY TIME CMD

1889tty1 00:00:00gdm-x-session

1891tty1 00:11:38Xorg2051tty1 00:00:00gnome-session-b

2365tty1 00:16:43gnome-shell

2520tty1 00:00:00ibus-daemon

我的python情况

dflx@dflx:~$ python

python python3 python3.6mpython3m

python2 python3.6python3.6m-config python3m-config

python2.7python3.6-config python3-config

python路径

dflx@dflx:~$ whereis python

python:/usr/bin/python2.7/usr/bin/python3.6m-config

/usr/bin/python /usr/bin/python3.6/usr/bin/python3.6m/usr/bin/python3.6-config

/usr/lib/python2.7/usr/lib/python3.7/usr/lib/python3.6/etc/python2.7/etc/python /etc/python3.6/usr/local/lib/python2.7/usr/local/lib/python3.6/usr/include/python3.6/usr/include/python3.6m/usr/share/python /home/dflx/anaconda3/bin/python3.6m-config /home/dflx/anaconda3/bin/python /home/dflx/anaconda3/bin/python3.6/home/dflx/anaconda3/bin/python3.6m/home/dflx/anaconda3/bin/python3.6-config /usr/share/man/man1/python.1.gzdflx@dflx:~$ which python

/home/dflx/anaconda3/bin/python

find查找命令

find “;

比如使用find命令,搜索在根目录下的所有condarc文件[anaconda源配置文件]所在位置,命令格式为find / -name "condarc"

dflx@dflx:~$ find /-name "condarc"find:‘/tmp/systemd-private-f3c0644e26174362bd722c3ae1177b11-systemd-timesyncd.service-58avLb’:权限不够find:‘/tmp/systemd-private-f3c0644e26174362bd722c3ae1177b11-bolt.service-lPkFIh’:权限不够find:‘/tmp/vmware-root’:权限不够find:‘/tmp/pulse-PKdhtXMmr18n’:权限不够find:‘/tmp/systemd-private-f3c0644e26174362bd722c3ae1177b11-colord.service-vIICqI’:权限不够/home/dflx/anaconda3/pkgs/conda-4.4.10-py36_0/info/test/tests/condarc

/home/dflx/anaconda3/pkgs/conda-4.5.4-py36_0/info/test/tests/condarc

cat 查看

dflx@dflx:~$ cat /home/dflx/anaconda3/pkgs/conda-4.4.10-py36_0/info/test/tests/condarc

# This is a sample .condarc file# channel locations. These override conda defaults, i.e., conda will# search *only* the channels listed here, in the order given. Use "defaults" to# automatically include all default channels. Non-url channels will be# interpreted as binstar usernames (this can be changed by modifying the# channel_alias key; see below).channels:-binstar_username

-http://some.custom/channel-defaults

# Alias to use for non-url channels used with the -c flag. Default is https://conda.binstar.org/............

查看另外一个

dflx@dflx:~$ cat /home/dflx/anaconda3/pkgs/conda-4.5.4-py36_0/info/test/tests/condarc

# This is a sample .condarc file# channel locations. These override conda defaults, i.e., conda will# search *only* the channels listed here, in the order given. Use "defaults" to# automatically include all default channels. Non-url channels will be# interpreted as binstar usernames (this can be changed by modifying the# channel_alias key; see below).channels:-binstar_username

-http://some.custom/channel-defaults

# Alias to use for non-url channels used with the -c flag. Default is https://conda.binstar.org/channel_alias:https://your.repo/# Proxy settings: http://[username]:[password]@[server]:[port]proxy_servers:http:http://user:pass@corp.com:8080https:https://user:pass@corp.com:8080

查看源url

dflx@dflx:~$ conda config --show

add_anaconda_token:Trueadd_pip_as_python_dependency:Trueaggressive_update_packages:-ca-certificates

-certifi

-openssl

allow_non_channel_urls:Falseallow_softlinks:Falsealways_copy:Falsealways_softlink:Falsealways_yes:Noneanaconda_upload:Noneauto_update_conda:Truechangeps1:Truechannel_alias:https://conda.anaconda.orgchannel_priority:Truechannels:-https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/-https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/-https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/-defaults

-conda-forge

在就是配置了一下多环境,我把vscode配ubuntu本身的python环境.因为我的selenium包,怎么在conda都安装不上.

dflx@dflx:~$ conda list

#只放了s 开头的包scikit-image 0.13.1py36h14c3975_1 defaults

scikit-learn 0.19.1py36h7aa7ec6_0 defaults

scipy 1.0.0py36hbf646e7_0 defaults

Scrapy1.5.0seaborn 0.8.1py36hfad7ec4_0 defaults

send2trash 1.4.2py36_0 defaults

service-identity 17.0.0setuptools 38.4.0py36_0 defaults

simplegeneric 0.8.1py36_2 defaults

singledispatch 3.4.0.3py36h7a266c3_0 defaults

sip 4.18.1py36h51ed4ed_2 defaults

six 1.11.0py36h372c433_1 defaults

snowballstemmer 1.2.1py36h6febd40_0 defaults

sortedcollections 0.5.3py36h3c761f9_0 defaults

sortedcontainers 1.5.9py36_0 defaults

sphinx 1.6.6py36_0 defaults

sphinxcontrib 1.0py36h6d0f590_1 defaults

sphinxcontrib-websupport 1.0.1py36hb5cb234_1 defaults

spyder 3.2.6py36_0 defaults

sqlalchemy 1.2.1py36h14c3975_0 defaults

sqlite 3.22.0h1bed415_0 defaults

statsmodels 0.8.0py36h8533d0b_0 defaults

sympy 1.1.1py36hc6d1c1c_0 defaults

tblib

然而ubuntu自带的python包的情况如下

dflx@dflx:~$ pip3 list

DEPRECATION:Thedefaultformat will switchto columns inthe future.Youcan use--format=(legacy|columns)(ordefine a format=(legacy|columns)inyour pip.conf under the [list]section)to disable thiswarning.requests-unixsocket (0.1.5)SecretStorage(2.3.1)selenium (3.12.0)setuptools (39.1.0)simplejson (3.15.0)six (1.11.0)system-service (0.3)systemd-python (234)traitlets (4.3.2)

我anaconda安装selenium好像出错,我已经修改源的来源了.........

dflx@dflx:~$ conda install selenium

Solvingenvironment:failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<CLASSPATH=.::/opt/java/jdk-9.0.1/lib:/opt/java/jdk-9.0.1/jre/lib

CONDA_ROOT=/home/dflx/anaconda3

DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path

MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path

PATH=/home/dflx/anaconda3/bin:/home/dflx/.local/bin:/usr/local/sbin:/usr/lo

cal/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sna

p/bin:/opt/java/jdk-9.0.1/bin:/opt/java/jdk-9.0.1/jre/bin

REQUESTS_CA_BUNDLE=SSL_CERT_FILE=WINDOWPATH=1ftp_proxy=http_proxy=https_proxy=socks_proxy=active environment :Noneuser config file :/home/dflx/.condarc

populated config files :/home/dflx/.condarc

conda version :4.5.4conda-build version :3.4.1python version :3.6.4.final.0baseenvironment :/home/dflx/anaconda3 (writable)channel URLs:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarchhttps://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarchhttps://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/linux-64https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarchpackagecache :/home/dflx/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值