What is "pkg-resources==0.0.0" in output of pip freeze command
<p>When I run <code>pip freeze</code> I see (among other expected packages) <code>pkg-resources==0.0.0</code>. I have seen a few posts mentioning this package (including <a href="https://stackoverflow.com/questions/38992194/why-does-pip-freeze-list-pkg-resources-0-0-0">this one</a>), but none explaining what it is, or why it is included in the output of <code>pip freeze</code>. The main reason I am wondering is out of curiosity, but also, it seems to break things in some cases when trying to install packages with a <code>requirements.txt</code> file generated with <code>pip freeze</code> that includes the <code>pkg-resources==0.0.0</code> line (for example when <a href="https://travis-ci.org/" rel="nofollow">Travis CI</a> tries to install dependencies through <code>pip</code> and finds this line).</p>

<p><strong>What is <code>pkg-resources</code>, and is it OK to remove this line from <code>requirements.txt</code>?</strong></p>

<h1>Update:</h1>

<p>I have found that this line only seems to exist in the output of <code>pip freeze</code> when I am in a <code>virtualenv</code>. I am still not sure what it is or what it does, but I will investigate further knowing that it is likely related to <code>virtualenv</code>.</p>

<p>As for the part of your question "is it OK to remove this line":</p>

<p>I have the same issue here developing on an ubuntu 16.04 with that very line in the requirements. When deploying on a debian 8.5 running <code>"pip install -r requirements.txt"</code> pip complains that pkg-resources  is "not found" but there is a global package installed "python-pkg-resources" so the dependency should be satisfied. Same on ubuntu: The package exists there as well.</p>

<p>As stated <a href="http://stackoverflow.com/questions/38992194/why-does-pip-freeze-list-pkg-resources-0-0-0">here</a> it seems to be some "implicitly installed package". </p>

<p>So: If you are on a Debian/Ubuntu having python-pkg-resources installed <strong>it should be safe to remove that line</strong>. I did so and everything is running fine. However since I am no expert on this you should keep in mind that this might lead to complications when deploying on another machine.</p>

python python-3.x pip ubuntu-16.04