mac上terminal_问题_1117
Posted qiyuanjiejie
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac上terminal_问题_1117相关的知识,希望对你有一定的参考价值。
(1)安装Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
如果是安装成功的话,就会出现
Installation successful!
??
==> Migrating /Library/Caches/Homebrew to /Users/qiyuan/Library/Caches/Homebrew. ==> Deleting /Library/Caches/Homebrew... Already up-to-date. ==> Installation successful! ==> Homebrew has enabled anonymous aggregate formulae and cask analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics.html ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations ==> Next steps: - Run `brew help` to get started - Further documentation: https://docs.brew.sh JHUAN:~ qiyuan$
但是我第一次是失败的,error??
remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Compressing objects: 100% (3/3), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Failed during: git fetch origin master:refs/remotes/origin/master --tags --force JHUAN:~ qiyuan$ JHUAN:~ qiyuan$ python Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin Type "help", "copyright", "credits" or "license" for more information.
有网友说是因为“ 这个错误是因为项目太久,tag资源文件太大”,(反正我个小白不懂)
解决方案是命令行输入:(后置缓冲器)
git config --global http.postBuffer 524288000
输入以后没有任何反应,这时再次重复之前的操作。
JHUAN:~ qiyuan$ git config --global http.postBuffer 524288000 #这是刚刚的解决方案 JHUAN:~ qiyuan$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" #这个是安装Homebrew的命令,记得把我的名字给删掉啊!!!
remote: Counting objects: 100% (4865/4865), done. remote: Compressing objects: 100% (4653/4653), done. remote: Total 4865 (delta 50), reused 868 (delta 21), pack-reused 0 Receiving objects: 100% (4865/4865), 4.03 MiB | 341.00 KiB/s, done. Resolving deltas: 100% (50/50), done. Tapped 2 commands and 4650 formulae (4,907 files, 12.6MB). ==> Migrating /Library/Caches/Homebrew to /Users/qiyuan/Library/Caches/Homebrew. ==> Deleting /Library/Caches/Homebrew... Already up-to-date. ==> Installation successful! ==> Homebrew has enabled anonymous aggregate formulae and cask analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics.html ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations ==> Next steps: - Run `brew help` to get started - Further documentation: https://docs.brew.sh JHUAN:~ qiyuan$
这样子就是安装成功了
(2)使用Homebrew安装python3
brew install python3
(3)terminial确认python和pip是否被安装。直接输入python3或者pip3
python3
(4)使用pip3安装requests,直接键入:(其他包同理)
pip3 install requests
(5)使用pip3安装wheel库。
pip3 install wheel
使用pip3下载 .whl文件,完成对requests的安装。(但上面那种方法更方便,在此只是记录对whl文件对下载)
pip3 install requests-2.17.3-py2.py3-none-any.whl
以上是关于mac上terminal_问题_1117的主要内容,如果未能解决你的问题,请参考以下文章