Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install latest dependency versions

When I install my package using pip install -e . it installs only unsatisfied dependencies and ignores dependency upgrades. How could I install newest dependency versions every time I run pip install -e .?

I have tried using pip install --upgrade -e ., but with this option nothing changes, I still get Requirement already satisfied, skipping upgrade: <dependency> notification instead of installation of the newest available version.

My setup.py file:

from setuptools import setup, find_packages

setup(
    name='test_package',
    author='test',
    author_email='[email protected]',
    description='Test package',
    version='0.0.1',
    packages=find_packages(),
    install_requires=[
        'pyyaml',
        'requests',
    ],   
    python_requires='>=3.6'
)
like image 723
niekas Avatar asked Apr 23 '19 05:04

niekas


1 Answers

I have found out, that there is an additional parameter --upgrade-strategy with options "eager" and "only-if-needed". The default is "only-if-needed". Choosing the "eager" option forces installation of the newest available versions of the dependencies:

pip install --upgrade --upgrade-strategy eager -e .
like image 71
niekas Avatar answered Oct 31 '22 17:10

niekas