pipdeptree
pipdeptree copied to clipboard
pipdeptree -l is broken - doesn't seem to respect local virtualenv
See: http://codepad.org/j5MwjQYt
There is some discrepancy here between what pip freeze
thinks is local and what pipdeptree -l
thinks is local.
Working fine for me. The -l
flag is same as that of pip freeze
ie. if in a virtualenv that has global access (created with the --system-site-packages
flag) do not output globally-installed packages. Was your spyda
env setup using the --system-site-packages
flag?
That's the thing it was not :)
So it shouldn't be seeing globally installed packages :/
cheers James
James Mills / prologic
E: [email protected] W: prologic.shortcircuit.net.au
On Thu, Feb 6, 2014 at 3:22 PM, Vineet Naik [email protected]:
Working fine for me. The -l flag is same as that of pip freeze ie. if in a virtualenv that has global access (created with the --system-site-packages flag) do not output globally-installed packages. Was your spyda env setup using the --system-site-packages flag?
— Reply to this email directly or view it on GitHubhttps://github.com/naiquevin/pipdeptree/issues/2#issuecomment-34293553 .
Can you please check if it's using pipdeptree
installed inside the virtualenv and not the global one?
Cheers
Ahh now that's where the problem is :)
I am using a globally installed pipdeptree :)
Does that help solve the issue?
cheers James
James Mills / prologic
E: [email protected] W: prologic.shortcircuit.net.au
On Thu, Feb 6, 2014 at 3:41 PM, Vineet Naik [email protected]:
Can you please check if it's using pipdeptree installed inside the virtualenv and not the global one?
Cheers
— Reply to this email directly or view it on GitHubhttps://github.com/naiquevin/pipdeptree/issues/2#issuecomment-34294286 .
Ok, now I get it. pipdeptree looks for installed packages in the currently active env (just like pip freeze) which means it needs to be installed inside the virtualenv. I know this is quite inconvenient. In fact I was wondering if it would be possible to have pipdeptree installed into a newly created env using virtualenvwrapper
hooks/extensions (haven't looked into it yet)
Also, as you suggested in #1 if this gets into pip
itself then it would be awesome :-)
Thanks for reporting this issue. I shall update the README to make this clear.
No problems! In certainly would heaps better built in to pip On Feb 6, 2014 3:58 PM, "Vineet Naik" [email protected] wrote:
Ok, now I get it. pipdeptree looks for installed packages in the currently active env (just like pip freeze) which means it needs to be installed inside the virtualenv. I know this is quite inconvenient. In fact I was wondering if it would be possible to have pipdeptree installed into the newly created env using virtualenvwrapper hooks/extensions (haven't looked into it yet)
Also, as you suggested in #1https://github.com/naiquevin/pipdeptree/issues/1if this gets into pip itself then it would be awesome :-)
Thanks for reporting this issue. I shall update the README to make this clear.
— Reply to this email directly or view it on GitHubhttps://github.com/naiquevin/pipdeptree/issues/2#issuecomment-34294966 .
@naiquevin virtualenvwrapper
has a hook called postmkvirtualenv
. If you place an executable script with pip install pipdeptree
in it at $WORKON_HOME/postmkvirtualenv
, pipdeptree
will be installed after the creation of each new virtualenv.
@jonafato This is really useful thanks. Will try it and also mention it in the README.
This should be no longer the case.