Why would a new VENV not have the same modules when using site packages argument?

32 views
Skip to first unread message

Xtian Simon

unread,
Apr 23, 2017, 6:57:32 PM4/23/17
to virtualenvwrapper
I posted another question asking for comment about using iPython together with virtual environments, and ran into a related strange issue.

My system is running Arch Linux and I believe all Python packages on this system were [url=https://pastebin.com/0K4pGRLv]installed using the Arch Linux package manager `pacman`[/url] (positive all the major ones).

Comparing the output of `pip freeze`:
1) I did a `pip freeze` of my [URL=https://pastebin.com/meaUx6AN]current install of Python from Arch packages[/URL].

2) Created a virtual environment, venv
    `$mkvirtualenv --system-site-packages venv`
Used the `--system-site-packages` argument to use the Arch base Python packages.

3) Compared a second `pip freeze` [URL=https://pastebin.com/3ytmPFPE]from inside the active venv[/URL].

I expected the diff to be the same (except for the one package I installed with pip, python-magic), but there are [url=https://pastebin.com/v0Nvr8CQ]numerous differences[/url].

What are some of the reasons a new VENV not have the same modules when using site packages argument?



For what reasons might the venv not have the same packages?

Jason Myers

unread,
Apr 23, 2017, 7:24:12 PM4/23/17
to virtuale...@googlegroups.com
This may be silly, but do you have a PYTHONPATH set?
--
You received this message because you are subscribed to the Google Groups "virtualenvwrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to virtualenvwrap...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xtian Simon

unread,
Apr 24, 2017, 10:06:57 AM4/24/17
to virtualenvwrapper

This may be silly, but do you have a PYTHONPATH set?

There is no output,
    $ echo $PYTHONPATH

NIL

I didn't mess with it :) Generally not a good idea when using the distro's packages.

Reply all
Reply to author
Forward
0 new messages