Verschiedene Versionen von PIP bei Verwendung von pkg_resourcesPython

Python-Programme
Anonymous
 Verschiedene Versionen von PIP bei Verwendung von pkg_resources

Post by Anonymous »

Ich versuche, Informationen über mehrere Maschinen zu sammeln, von denen jeder verschiedene Python -Versionen und installierte Module ausführt. Ich sehe, dass die gemeldete PIP-Version nicht korrekt ist: pkg_resources < /p>
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> dists = [str(d).replace(" ","==") for d in pkg_resources.working_set]
>>> dists
['pip==1.5.6', 'pycryptodome==3.9.9', 'requests==2.10.0', 'setuptools==2.1', 'urllib3==1.24.3']
>>> import pip
>>> pip.__version__
'19.1.1'
< /code>
python -m pip freeze
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as
Python 3.4 won't be maintained after March 2019 (cf PEP 429).
pycryptodome==3.9.9
requests==2.10.0
urllib3==1.24.3

< /code>
The other libraries are fine:
>>> import requests
>>> requests.__version__
'2.10.0'
>>> import urllib3
>>> urllib3.__version__
'1.24.3'
< /code>
Why is this happening?
Is there a reliable way to get a module version without importing it?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post