niekas
niekas

Reputation: 9097

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'
)

Upvotes: 11

Views: 8351

Answers (1)

niekas
niekas

Reputation: 9097

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 .

Upvotes: 26

Related Questions