My general Python workflow, which has been restricted to my own Windows laptop so far, involves using conda
to manage environments and install packages.
However, I now need to work on a project from a remote desktop as well. That remote desktop has python3
and pip
installed, but I cannot install conda
(and I do not want to). I decided to uploaded the required packages to my repository, so that I can correctly run my project on the remote desktop.
To get to the point: since I do not have conda
installed on the remote desktop, I used pip freeze > requirements.txt
to generate a requirements file on my laptop (that I uploaded to my repo), hoping to use pip install -r requirements.txt
on the remote desktop. However, the requirements.txt
file contains package annotations of the format package-name @ file:///some/directory
, which makes the package installation fail on the remote desktop.
What do the @ file:///...
annotations mean, why are they generated, and is there a way to just get the package versions in the package-name==package-version
format instead, so that I can install them using pip
on my remote desktop?
Please check out this command :
pip list --format=freeze > requirements.txt
For more information read this github discussion