What's the difference between apt-get virtualenv and pip virtualenv?

前端 未结 3 1687
故里飘歌
故里飘歌 2021-01-02 05:33

What\'s the difference between the virtualenv from apt-get and that from pip? Are they interchangeable?

apt-get install virtualenv

The following extra packa         


        
3条回答
  •  心在旅途
    2021-01-02 06:08

    apt or apt-get - installer debian similar distributions and install the packages in the directory /usr/lib/python2.7/dist-packages.

    pip install - python package manager and install the packages in the directory /usr/local/lib/python2.7/dist-packages

    Both directories are in the path of python that it is looking for modules import.

    >>> import sys
    >>> sys.path
    ['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/local/lib/python2.7/dist-packages',  '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']
    

提交回复
热议问题