安装百度网盘bypy客户端
·
安装百度网盘bypy客户端
[root@iZbp13pl2v34qj0thwq9aiZ ~]# pip install bypy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting bypy
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/ac/5f/86d61ed2030bc8b88e0bee259f1215a3e289653a120d318a1334b82057e5/bypy-1.8.5-py2.py3-none-any.whl (243kB)
|████████████████████████████████| 245kB 3.7MB/s
Collecting multiprocess (from bypy)
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/4b/7f/55f7dacc3127a918110763998dfbabbec8dd693bfde9a7df9c4e44f4da29/multiprocess-0.70.13.tar.gz (1.8MB)
|████████████████████████████████| 1.8MB 427kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Collecting requests-toolbelt (from bypy)
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl (54kB)
|████████████████████████████████| 61kB 2.2MB/s
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (from bypy) (2.22.0)
Collecting dill>=0.3.5.1 (from multiprocess->bypy)
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/12/ff/3b1a8f5d59600393506c64fa14d13afdfe6fe79ed65a18d64026fe9f8356/dill-0.3.5.1-py2.py3-none-any.whl (95kB)
|████████████████████████████████| 102kB 7.5MB/s
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests->bypy) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests->bypy) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests->bypy) (1.25.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests->bypy) (2019.6.16)
Building wheels for collected packages: multiprocess
Building wheel for multiprocess (PEP 517) ... done
Stored in directory: /root/.cache/pip/wheels/57/ba/fa/b79ef1ee6cd017f36ed7d6dd98e5ff769d03e2f77763e4252f
Successfully built multiprocess
Installing collected packages: dill, multiprocess, requests-toolbelt, bypy
Successfully installed bypy-1.8.5 dill-0.3.5.1 multiprocess-0.70.13 requests-toolbelt-1.0.0
WARNING: You are using pip version 19.1.1, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
运行试试,它让你访问一个网址,获得百度网盘的授权(其中授权码我****处理了)
[root@iZbp13pl2v34qj0thwq9aiZ ~]# bypy info
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!
RequestsDependencyWarning)
Please visit:
https://openapi.baidu.com/oauth/2.0/authorize?scope=basic+netdisk&redirect_uri=oob&response_type=code&client_id=q8WE4EpCsau1oS0MplgMKNBn
And authorize this app
Paste the Authorization Code here within 10 minutes.
Press [Enter] when you are done
b*****************************9
Authorizing, please be patient, it may take upto 300 seconds...
Quota: 10.005TB
Used: 1.929TB

列出试试,看来安装包依赖问题还得解决
[root@iZbp13pl2v34qj0thwq9aiZ ~]# bypy list
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (2.2.1) doesn't match a supported version!
RequestsDependencyWarning)
/apps/bypy ($t $f $s $m $d):
尝试升级urllib3和chardet
[root@iZbp13pl2v34qj0thwq9aiZ ~]# pip install -U urllib3 chardet
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting urllib3
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/33/cf/8435d5a7159e2a9c83a95896ed596f68cf798005fe107cc655b5c5c14704/urllib3-1.26.20-py2.py3-none-any.whl (144kB)
|████████████████████████████████| 153kB 21.2MB/s
Collecting chardet
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl (178kB)
|████████████████████████████████| 184kB 75.1MB/s
ERROR: requests 2.22.0 has requirement chardet<3.1.0,>=3.0.2, but you'll have chardet 4.0.0 which is incompatible.
ERROR: requests 2.22.0 has requirement urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1, but you'll have urllib3 1.26.20 which is incompatible.
Installing collected packages: urllib3, chardet
Found existing installation: urllib3 1.25.3
Uninstalling urllib3-1.25.3:
Successfully uninstalled urllib3-1.25.3
Found existing installation: chardet 3.0.4
Uninstalling chardet-3.0.4:
Successfully uninstalled chardet-3.0.4
Successfully installed chardet-4.0.0 urllib3-1.26.20
WARNING: You are using pip version 19.1.1, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
删除这两个安装包
[root@iZbp13pl2v34qj0thwq9aiZ ~]# pip uninstall urllib3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Uninstalling urllib3-1.26.20:
Would remove:
/usr/lib/python2.7/site-packages/urllib3-1.26.20.dist-info/*
/usr/lib/python2.7/site-packages/urllib3/*
Proceed (y/n)? y
Successfully uninstalled urllib3-1.26.20
[root@iZbp13pl2v34qj0thwq9aiZ ~]# pin uninstall chardet
-bash: pin: command not found
[root@iZbp13pl2v34qj0thwq9aiZ ~]# pip uninstall chardet
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Uninstalling chardet-4.0.0:
Would remove:
/usr/bin/chardetect
/usr/lib/python2.7/site-packages/chardet-4.0.0.dist-info/*
/usr/lib/python2.7/site-packages/chardet/*
Would not remove (might be manually added):
/usr/lib/python2.7/site-packages/chardet/chardetect.py
/usr/lib/python2.7/site-packages/chardet/chardetect.pyo
/usr/lib/python2.7/site-packages/chardet/constants.py
/usr/lib/python2.7/site-packages/chardet/constants.pyo
Proceed (y/n)? y
Successfully uninstalled chardet-4.0.0
改为升级requests,它会把这两个包一起升级了
[root@iZbp13pl2v34qj0thwq9aiZ ~]# pip install --upgrade requests
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting requests
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63kB)
|████████████████████████████████| 71kB 20.5MB/s
Requirement already satisfied, skipping upgrade: idna<3,>=2.5; python_version < "3" in /usr/lib/python2.7/site-packages (from requests) (2.8)
Collecting chardet<5,>=3.0.2; python_version < "3" (from requests)
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl (178kB)
|████████████████████████████████| 184kB 72.6MB/s
Collecting urllib3<1.27,>=1.21.1 (from requests)
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/33/cf/8435d5a7159e2a9c83a95896ed596f68cf798005fe107cc655b5c5c14704/urllib3-1.26.20-py2.py3-none-any.whl (144kB)
|████████████████████████████████| 153kB 55.3MB/s
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests) (2019.6.16)
Installing collected packages: chardet, urllib3, requests
Found existing installation: chardet 2.2.1
Uninstalling chardet-2.2.1:
Successfully uninstalled chardet-2.2.1
Found existing installation: requests 2.22.0
Uninstalling requests-2.22.0:
Successfully uninstalled requests-2.22.0
Successfully installed chardet-4.0.0 requests-2.27.1 urllib3-1.26.20
WARNING: You are using pip version 19.1.1, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
再试,命令运行了,依赖问题解决了
[root@iZbp13pl2v34qj0thwq9aiZ ~]# bypy list
/apps/bypy ($t $f $s $m $d):
上传要备份的文件,也不快,如果文件较大,建议后台运行
[root@iZbp13pl2v34qj0thwq9aiZ ~]# bypy upload data_minute_p202204.sql
[root@iZbp13pl2v34qj0thwq9aiZ ~]# bypy upload data_minute_p202205.sql
[root@iZbp13pl2v34qj0thwq9aiZ ~]# bypy upload data_minute_p202206.sql
[==__________________] 14% (140.0MB/960.8MB) ETA: 1h44m (134kB/s, 17m48s gone)
nohup bypy upload data_minute_p202210.sql &
[3] 31084
上传的文件在百度网盘“我的应用数据”下(apps/bypy)目录下
更多推荐
所有评论(0)