Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the --pre option in pip signify?

Tags:

python

pip

I saw on this page that pip install neo4j-doc-manager --pre was used. What does the --pre flag mean?

like image 963
Ali Avatar asked Feb 01 '16 13:02

Ali


People also ask

What is pip -- user option?

The --user option modifies all pip commands that accept it to see/operate on the user install folder, so if you use pip list --user it will only show you packages installed with pip install --user . Follow this answer to receive notifications.

Does pip come preinstalled?

Most distributions of Python come with pip preinstalled. Python 2.7. 9 and later (on the python2 series), and Python 3.4 and later include pip (pip3 for Python 3) by default.

How do I choose pip package?

To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .

What does the flag do in pip?

The -e flag makes it an “editable” install, leaving the source code in place and allowing you to modify it if desired. (Otherwise, by default, pip would move the python code to some site-packages directory and delete everything else.)


1 Answers

It tells pip to include pre-release versions of packages when searching for the latest version.

From the pip install reference documentation:

Include pre-release and development versions. By default, pip only finds stable versions.

See the section on Pre-release Versions:

Starting with v1.4, pip will only install stable versions as specified by PEP426 by default. If a version cannot be parsed as a compliant PEP426 version then it is assumed to be a pre-release.

The neo4j-doc-manager package currently has 5 releases out; one 'stable' 0.1.0 release and 4 devX releases which are newer, see the machine-readable list of releases. Without the --pre switch the 0.1.0 release would be installed, with the switch (as of this writing) 1.0.0.dev11 would be installed instead.

like image 132
Martijn Pieters Avatar answered Oct 02 '22 22:10

Martijn Pieters