I have a shell script whose last line is:
pip install .
What does it do?
pip install <package-name>
installs the specified packagepip install -r requirements.txt
installs all packages specified in requirements.txt
But I am not sure what the above command does.
Basically you are specifying the location from which the pip package manager to extract the package information from.
It means run it as a shell command rather than a notebook command. For instance, using a command without ! in the terminal same as using the command with ! in jupyter notebook or google code lab.
They do exactly the same thing. In fact, the docs for distributing Python modules were just updated to suggest using python -m pip instead of the pip executable, because it's easier to tell which version of python is going to be used to actually run pip that way.
To install modules locally, you need to create and activate what is called a virtual environment, so pip install installs to the folder where that virtual environment is located, instead of globally (which may require administrator privileges).
"Install the project found in the current directory".
This is just a specific case of pip install /path/to-source/tree
.
To quote the the pip install
documentation describing this usage:
pip install [options] [-e] <local project path> ...
Explicitly, pip install .
will execute the setup.py
file in the current directory (which will usually load a requirements.txt
file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With