How to Check the Command Line Without Installing the Latest Version of the Python Module

Asked 2 years ago, Updated 2 years ago, 24 views

Is there a way to get the latest version of the module output from the command line, whether the python module is installed or not?

As an image, I would like to do the same as if Available Packages could be retrieved in yum info [package_name].

python

2022-09-30 20:32

2 Answers

There seems to be no such option for pip.

An alternative that you can come up with is dry-run installation, such as easy_install-ndjango, but it will even download the package.

https://pypi.python.org/pypi/Django/json It seems easy to create a script to retrieve and view information from.

info.py:

import urlib
import sys
import json
uo=urllib.urlopen('https://pypi.python.org/pypi/%s/json'%sys.argv[1])
pkg = json.load(uo)
print pkg ['info'] ['version']

$python 2.7 info.py django
1.8a1


2022-09-30 20:32

I have received similar questions/answers from my home, so I will share them with you.

https://stackoverflow.com/questions/4888027/python-and-pip-list-all-versions-of-a-package-thats-available

The tool yolk introduced here seemed to be good, showing all available versions of pypi

$yolk-Vsphinx
Sphinx 1.3b3
Sphinx 1.2.3


2022-09-30 20:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.