pip安装包时遇到的Bug
【背景】
今天打包人生中的第一个package到PyPi,在linux上执行pip3 install mysqltools-python安装一点问题都没有,打脸的是在自己的MAC上
居然安装不上
pip3 install mysqltools-python
Collecting mysqltools-python
Downloading https://files.pythonhosted.org/packages/46/da/de9495da7bf0ee9225a1f1988ab5cb4e8573388338df1e55d8b5272c413a/mysqltools-python-2.18.09.01.tar.gz
Collecting mysql-connector-python>=8.0. (from mysqltools-python)
Downloading https://files.pythonhosted.org/packages/23/ca/9bb3e8c2ae661f7f5ca3425cbcb82f7e676276d2d07d17812c4e1a83fa0b/mysql_connector_python-8.0.12-cp36-cp36m-macosx_10_12_x86_64.whl (3.5MB)
% |████████████████████████████████| .5MB 435kB/s
Requirement already satisfied: protobuf>=3.0. in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3./site-packages (from mysql-connector-python>=8.0.->mysqltools-python) (3.5.)
Requirement already satisfied: six>=1.9 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3./site-packages (from protobuf>=3.0.->mysql-connector-python>=8.0.->mysqltools-python) (1.11.)
Requirement already satisfied: setuptools in ./Library/Python/3.6/lib/python/site-packages (from protobuf>=3.0.->mysql-connector-python>=8.0.->mysqltools-python) (40.2.)
Building wheels for collected packages: mysqltools-python
Running setup.py bdist_wheel for mysqltools-python ... done
Stored in directory: /Users/jianglexing/Library/Caches/pip/wheels///6a/3f6c6442c7f3608c70d4d3f35e43146712b49bcdfa33485be8
Successfully built mysqltools-python
Installing collected packages: mysql-connector-python, mysqltools-python
Found existing installation: mysql-connector-python 2.1.
Cannot uninstall 'mysql-connector-python'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
看报错的信息提示说“Cannot unintall mysql-connector-python” 由于mysqltools-python依赖于mysql-connector-python-8.0.12
所以pip会先把我机器上低版本的“mysql-connector-python”卸载掉,然后安装“mysql-connector-python-8.0.12”以上版本的;
现在的问题就出在了卸载“mysql-connector-python”上。
【第一回合 手工卸载mysql-connector-python】
pip3 uninstall mysql-connector-python
Cannot uninstall 'mysql-connector-python'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You are using pip version 10.0., however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
看来还是太年轻了,手工卸载不了!
【第二回合 google】
google了一下之后发现并不是只有我一个人遇到了这个问题,这个是pip-10.0.1版本的一个bug,这样解决方案就来了,我只要把pip3的版本
降下去就行了
pip --version
pip 10.0. from /Library/Frameworks/Python.framework/Versions/3.6/lib/python3./site-packages/pip (python 3.6) pip install --upgrade --force-reinstall pip==9.0.
Collecting pip==9.0.
Downloading https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl (1.4MB)
% |████████████████████████████████| .4MB .2MB/s
Installing collected packages: pip
Found existing installation: pip 10.0.
Uninstalling pip-10.0.:
Successfully uninstalled pip-10.0.
Successfully installed pip-9.0.
【第三回合 安装mysqltools-python】
pip3 install mysqltools-python
Collecting mysqltools-python
Downloading https://files.pythonhosted.org/packages/46/da/de9495da7bf0ee9225a1f1988ab5cb4e8573388338df1e55d8b5272c413a/mysqltools-python-2.18.09.01.tar.gz
Collecting mysql-connector-python>=8.0. (from mysqltools-python)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/23/ca/9bb3e8c2ae661f7f5ca3425cbcb82f7e676276d2d07d17812c4e1a83fa0b/mysql_connector_python-8.0.12-cp36-cp36m-macosx_10_12_x86_64.whl (3.5MB)
% |████████████████████████████████| .5MB 230kB/s
Requirement already satisfied: protobuf>=3.0. in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3./site-packages (from mysql-connector-python>=8.0.->mysqltools-python)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3./site-packages (from protobuf>=3.0.->mysql-connector-python>=8.0.->mysqltools-python)
Requirement already satisfied: six>=1.9 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3./site-packages (from protobuf>=3.0.->mysql-connector-python>=8.0.->mysqltools-python)
Building wheels for collected packages: mysqltools-python
Running setup.py bdist_wheel for mysqltools-python ... done
Stored in directory: /var/root/Library/Caches/pip/wheels///6a/3f6c6442c7f3608c70d4d3f35e43146712b49bcdfa33485be8
Successfully built mysqltools-python
Installing collected packages: mysql-connector-python, mysqltools-python
Successfully installed mysql-connector-python-8.0. mysqltools-python-2.18.9.1
You are using pip version 9.0., however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
sh-3.2#
【学习交流】
-----------------------------http://www.sqlpy.com-------------------------------------------------
-----------------------------http://www.sqlpy.com-------------------------------------------------
---
pip安装包时遇到的Bug的更多相关文章
- python2 pip安装包等出现各种编码错误UnicodeDecodeError: 'ascii'(/或者utf-8) codec can't decode byte 0xd2...
1.问题描述: python2环境,pip安装包时报错UnicodeDecodeError: 'ascii'(/或者utf-8) codec can't decode byte 0xd2... 类似如 ...
- pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat Windows7下pip安装包报错:Microso ...
- Windows下pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
刚在机器上windows环境下装上pip方便以后安装包的时候使用,谁知道第一次使用pip安装asyncio的时候就报错. 在Windows7x64下使用pip安装包的时候提示报错:Microsoft ...
- How to: Installshield做安装包时如何添加文件
原文:How to: Installshield做安装包时如何添加文件 我一直以为这不是一个问题,可是没想到在几个群内,对于如何向安装包添加文件不解的大有人在,今日稍暇,整理成篇,以供参考 首先我想再 ...
- Apt下载安装包时Hash校验和不符
近期我的电脑在使用apt-get或aptitude下载Linux安装包时总是出现如下图所示的Hash校验和不符的问题.以至于下载过程被频繁中断,不得不反复运行apt-get或者在aptitude中按g ...
- Python 解决Python安装包时提示Unable to find vcvarsall.bat的问题
解决Python安装包时提示Unable to find vcvarsall.bat的问题 by:授客 QQ:1033553122 问题 Python安装包时,提示Unable to find v ...
- 【python】 Windows下pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
刚在机器上windows环境下装上pip方便以后安装包的时候使用,谁知道第一次使用pip安装asyncio的时候就报错. 在Windows7x64下使用pip安装包的时候提示报错:Microsoft ...
- (转)Windows下pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
刚在机器上windows环境下装上pip方便以后安装包的时候使用,谁知道第一次使用pip安装asyncio的时候就报错. 在Windows7x64下使用pip安装包的时候提示报错:Microsoft ...
- pip安装包失败的常见解决方法
pip安装包失败的常见解决方法 方法一 当安装包失效的时候可以去网站下载whl文件.下载的时候应该先查看电脑上 python 的版本. 地址:https://www.lfd.uci.edu/~gohl ...
随机推荐
- 一致性哈希算法——PHP实现代码
<?php /** * Flexihash - A simple consistent hashing implementation for PHP. * * The MIT License * ...
- 算法笔记_215:第六届蓝桥杯软件类校赛部分真题(Java语言B组)
目录 1 题目一 2 题目二 3 题目三 前言:以下代码仅供参考,若有错误欢迎指正哦~ 1 题目一 java中提供了对正则表达式的支持. 有的时候,恰当地使用正则,可以让我们的工作事半功倍! 如下代码 ...
- Page Visibility实现焦点丢失提醒
0.前言 HTML5 Page Visibility API是一个很实用的特性.当页面对用户不可见时,暂停播放页面中的视频.动画.声音.以及其它耗费内存的操作,等用户回来时.再继续这些操作. 当然,最 ...
- 在大负载中使用LoadRunner进行负载测试()
在大负载中使用LoadRunner进行负载测试,需要配置一些环境来满足大负载下各种资源的充足: 1.为了避免出现“No Buffer Space Available”的错误,需要进行如下配置: 1)修 ...
- Ubuntu x86-64汇编(3) 数值操作指令
指令标注 Operand Notation 指令instruction即运算operation, 操作的对象为一个或多个运算数operand, 使用不同的标记表示不同的约束 <reg> ...
- Linux命令行监控网口流量
1.ifconfig [网卡名] ifconfig eth0 . 2. /proc/net/dev cat /proc/net/dev . 3. 使用watch命令配合 ifconfig, cat / ...
- 【apache】phpstudy中apache 隐藏入口文件index.php (解决no input file specified错误)
步骤: 下面我说下 apache 下 ,如何 去掉URL 里面的 index.php 例如: 你原来的路径是: localhost/index.php/Index/index改变后的路径是: loca ...
- Easyui入门视频教程 第07集---Accordion的使用
Accordion 是一个 收缩的组件 类似挂历的 百度了一下 意思是 accordion 英[əˈkɔ:diən] 美[əˈkɔrdiən] n. 手风琴 adj. 可折叠的 他就是 一个折叠的 很 ...
- <转>LUA语法分析
本文选自:http://www.cnblogs.com/nazhizq/p/6516561.html 一步步调试,在lparser.c文件中luaY_parser函数是语法分析的重点函数,词法分析也是 ...
- 第一次使用Mac
Mac禁用掉默认输入法 搜狗输入法已经包含中文.英文输入法了,其余输入法可以删除掉.按ctrol键的时候本来应该是搜狗输入法中英文切换,结果却是搜狗输入法和ABC输入法之间互相切换. 打开键盘偏好设置 ...