Reputation: 303
I am new to Python virtualenvs, so I might be misunderstanding something here. I am following this tutorial.
First, I installed virtualenv
:
$ sudo aptitude update && aptitude install virtualenv
Second, I create an example virtualenv:
$ mkdir /example/path/test && cd $_
$ virtualenv --no-site-packages myenv
Using base prefix '/usr'
New python executable in myenv/bin/python3
Also creating executable in myenv/bin/python
Installing setuptools, pip...done.
The virtualenv works without problems, however the directory myenv/lib/python3.4
contains according to tree
97 directories and 730 files. ls -hla
gives:
insgesamt 52K
drwxr-xr-x 5 myname myname 4,0K Nov 26 11:06 .
drwxr-xr-x 3 myname myname 4,0K Nov 26 11:06 ..
lrwxrwxrwx 1 myname myname 25 Nov 26 11:06 abc.py -> /usr/lib/python3.4/abc.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 base64.py -> /usr/lib/python3.4/base64.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 bisect.py -> /usr/lib/python3.4/bisect.py
lrwxrwxrwx 1 myname myname 33 Nov 26 11:06 _bootlocale.py -> /usr/lib/python3.4/_bootlocale.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 codecs.py -> /usr/lib/python3.4/codecs.py
lrwxrwxrwx 1 myname myname 30 Nov 26 11:06 collections -> /usr/lib/python3.4/collections
lrwxrwxrwx 1 myname myname 38 Nov 26 11:06 _collections_abc.py -> /usr/lib/python3.4/_collections_abc.py
lrwxrwxrwx 1 myname myname 47 Nov 26 11:06 config-3.4m-x86_64-linux-gnu -> /usr/lib/python3.4/config-3.4m-x86_64-linux-gnu
lrwxrwxrwx 1 myname myname 26 Nov 26 11:06 copy.py -> /usr/lib/python3.4/copy.py
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 copyreg.py -> /usr/lib/python3.4/copyreg.py
drwxr-xr-x 3 myname myname 4,0K Nov 26 11:06 distutils
lrwxrwxrwx 1 myname myname 35 Nov 26 11:06 _dummy_thread.py -> /usr/lib/python3.4/_dummy_thread.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 encodings -> /usr/lib/python3.4/encodings
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 fnmatch.py -> /usr/lib/python3.4/fnmatch.py
lrwxrwxrwx 1 myname myname 31 Nov 26 11:06 functools.py -> /usr/lib/python3.4/functools.py
lrwxrwxrwx 1 myname myname 32 Nov 26 11:06 __future__.py -> /usr/lib/python3.4/__future__.py
lrwxrwxrwx 1 myname myname 33 Nov 26 11:06 genericpath.py -> /usr/lib/python3.4/genericpath.py
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 hashlib.py -> /usr/lib/python3.4/hashlib.py
lrwxrwxrwx 1 myname myname 27 Nov 26 11:06 heapq.py -> /usr/lib/python3.4/heapq.py
lrwxrwxrwx 1 myname myname 26 Nov 26 11:06 hmac.py -> /usr/lib/python3.4/hmac.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 importlib -> /usr/lib/python3.4/importlib
lrwxrwxrwx 1 myname myname 25 Nov 26 11:06 imp.py -> /usr/lib/python3.4/imp.py
lrwxrwxrwx 1 myname myname 24 Nov 26 11:06 io.py -> /usr/lib/python3.4/io.py
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 keyword.py -> /usr/lib/python3.4/keyword.py
lrwxrwxrwx 1 myname myname 30 Nov 26 11:06 lib-dynload -> /usr/lib/python3.4/lib-dynload
lrwxrwxrwx 1 myname myname 31 Nov 26 11:06 linecache.py -> /usr/lib/python3.4/linecache.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 locale.py -> /usr/lib/python3.4/locale.py
-rw-r--r-- 1 myname myname 0 Nov 26 11:06 no-global-site-packages.txt
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 ntpath.py -> /usr/lib/python3.4/ntpath.py
lrwxrwxrwx 1 myname myname 30 Nov 26 11:06 operator.py -> /usr/lib/python3.4/operator.py
-rw-r--r-- 1 myname myname 4 Nov 26 11:06 orig-prefix.txt
lrwxrwxrwx 1 myname myname 24 Nov 26 11:06 os.py -> /usr/lib/python3.4/os.py
lrwxrwxrwx 1 myname myname 40 Nov 26 11:06 plat-x86_64-linux-gnu -> /usr/lib/python3.4/plat-x86_64-linux-gnu
lrwxrwxrwx 1 myname myname 31 Nov 26 11:06 posixpath.py -> /usr/lib/python3.4/posixpath.py
drwxr-xr-x 2 myname myname 4,0K Nov 26 11:06 __pycache__
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 random.py -> /usr/lib/python3.4/random.py
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 reprlib.py -> /usr/lib/python3.4/reprlib.py
lrwxrwxrwx 1 myname myname 24 Nov 26 11:06 re.py -> /usr/lib/python3.4/re.py
lrwxrwxrwx 1 myname myname 33 Nov 26 11:06 rlcompleter.py -> /usr/lib/python3.4/rlcompleter.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 shutil.py -> /usr/lib/python3.4/shutil.py
drwxr-xr-x 9 myname myname 4,0K Nov 26 11:06 site-packages
-rw-r--r-- 1 myname myname 27K Nov 26 11:06 site.py
lrwxrwxrwx 1 myname myname 33 Nov 26 11:06 sre_compile.py -> /usr/lib/python3.4/sre_compile.py
lrwxrwxrwx 1 myname myname 35 Nov 26 11:06 sre_constants.py -> /usr/lib/python3.4/sre_constants.py
lrwxrwxrwx 1 myname myname 31 Nov 26 11:06 sre_parse.py -> /usr/lib/python3.4/sre_parse.py
lrwxrwxrwx 1 myname myname 26 Nov 26 11:06 stat.py -> /usr/lib/python3.4/stat.py
lrwxrwxrwx 1 myname myname 28 Nov 26 11:06 struct.py -> /usr/lib/python3.4/struct.py
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 tarfile.py -> /usr/lib/python3.4/tarfile.py
lrwxrwxrwx 1 myname myname 30 Nov 26 11:06 tempfile.py -> /usr/lib/python3.4/tempfile.py
lrwxrwxrwx 1 myname myname 30 Nov 26 11:06 tokenize.py -> /usr/lib/python3.4/tokenize.py
lrwxrwxrwx 1 myname myname 27 Nov 26 11:06 token.py -> /usr/lib/python3.4/token.py
lrwxrwxrwx 1 myname myname 27 Nov 26 11:06 types.py -> /usr/lib/python3.4/types.py
lrwxrwxrwx 1 myname myname 30 Nov 26 11:06 warnings.py -> /usr/lib/python3.4/warnings.py
lrwxrwxrwx 1 myname myname 29 Nov 26 11:06 weakref.py -> /usr/lib/python3.4/weakref.py
lrwxrwxrwx 1 myname myname 33 Nov 26 11:06 _weakrefset.py -> /usr/lib/python3.4/_weakrefset.py
To me that many files and directories seem quite a lot, and in the tutorial there are no files at all mentioned at this directory.
Questions
Upvotes: 0
Views: 176
Reputation: 599778
You don't need to look in lib. All those files are needed, but you never need to go there yourself.
Upvotes: 1