python包中修改的依赖项不会显示

时间:2015-04-01 16:12:44

标签: python package pip

在我所拥有的Python包中,setup.py我通过删除版本号上的条件来修改依赖项:

setup(
    name='MyTool',
    version='0.1.5',
    author='myname',
    author_email='myname@myname.com',
    packages=['mytool'],
    scripts=['bin/my_tool.py'],
    url='https://pypi.python.org/pypi/mytool',
    license='LICENSE.txt',
    description='This is my tool.',
    long_description=open('README.txt').read(),
    install_requires=[
        "scipy",
        "numpy",
        "prettytable"
    ],
)

我跑了:

$ python setup.py sdist
$ python setup.py sdist upload

但是当我运行pip时,它指的是之前的要求:

$ sudo pip install  MyTool
Requirement already satisfied (use --upgrade to upgrade): MyTool in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from MyTool)
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python2.7/dist-packages (from MyTool)
Requirement already satisfied (use --upgrade to upgrade): prettytable>=0.7.2 in /usr/local/lib/python2.7/dist-packages (from MyTool)
Cleaning up...

我做错了什么?

1 个答案:

答案 0 :(得分:1)

这意味着您已经安装了MyTool包。 如果要安装最新版本(刚刚上传的版本),请尝试:

sudo pip install -U MyTool