0

I have got two different versions of paramiko package in my PYTHONPATH environment coming from two different sets of dependencies installed. I can't change the order in which two different packages installation paths are setup due to various other dependencies and I can't uninstall any one of it either. When imported, by default this packages gets picked from the first installation path (has version 1.7.7.1) but I want to use the one from second package path (has version 2.4.0).

There is option to force this by changing the sys.path but I was wondering if we have any better option than this. Stumbled on this stackoverflow question but then ran into packageresource version conflict issue..

pkg_resources.VersionConflict: (paramiko 1.7.7.1 (first_installtion_path), Requirement.parse('paramiko==2.4.0'))

mentioned in the comments section of the accepted answer. The link mentioned there for the fix is broken so can't see what could the fix be.

Do we have any better option than changing the sys.path, keeping the limitation of not able to change the installed packages.

Dinesh Maurya
  • 822
  • 8
  • 24
  • Here's a working link to the broken link from the comment on other question https://web.archive.org/web/20160621144932/https://bugs.python.org/setuptools/issue139 – Matt Pitkin May 03 '23 at 14:09
  • Which operating system? These paths are literally in the PYTHONPATH environment variable and not in a standard python package directory? A common way to deal with packages that have conflicting dependencies is to use virtual environments. Or have these packages sort out these dependency issues. – tdelaney May 03 '23 at 14:12

0 Answers0