Skip to main content
Rollback to Revision 15
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

     $ which pip 

    to see what version of python that is. If you see something like:

     $ which pip /usr/local/bin/pip 

    then do:

     $ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

    You can see the python version in the output.

    By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

     $ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

    virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

    http://docs.python-guide.org/en/latest/dev/virtualenvs/

    virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  2. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

     /usr/local/bin 
  3. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.$ which pip

Virtualenvwrapper

to see what version of python that is. If you see something like:

 $ which pip /usr/local/bin/pip 

then do:

$ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

You can see the python version in the output.

By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

$ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

http://docs.python-guide.org/en/latest/dev/virtualenvs/

virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  1. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

    /usr/local/bin

  2. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

========VIRTUALENVWRAPPER=========

  1. I had some problems getting virtualenvwrapper to work. This is what I ended up putting in ~/.bash_profile:

     export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #http://stackoverflow.com/questions/19665327/virtualenvwrapper-installation-snow-leopard-python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh 

    export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #Virtualenvwrapper installation snow leopard python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh

  2. The -p option works differently with virtualenvwrapper: I have to specify the full path to the python interpreter to be used in the new environment(when I do not want to use the default python version):

     $ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate removes the 'bin' directory of the environment activated with 'source activate' from PATH. 

    Unlike$ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv, with interpreter virtualenvwrapper will create the environment at/usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate

    removes the location specified by'bin' directory of the $WORKON_HOME environment variable. That keeps all your environments in one placeactivated with 'source activate' from PATH.

Unlike virtualenv, virtualenvwrapper will create the environment at the location specified by the $WORKON_HOME environment variable. That keeps all your environments in one place.

  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

     $ which pip 

    to see what version of python that is. If you see something like:

     $ which pip /usr/local/bin/pip 

    then do:

     $ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

    You can see the python version in the output.

    By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

     $ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

    virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

    http://docs.python-guide.org/en/latest/dev/virtualenvs/

    virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  2. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

     /usr/local/bin 
  3. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

Virtualenvwrapper

  1. I had some problems getting virtualenvwrapper to work. This is what I ended up putting in ~/.bash_profile:

     export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #http://stackoverflow.com/questions/19665327/virtualenvwrapper-installation-snow-leopard-python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh 
  2. The -p option works differently with virtualenvwrapper: I have to specify the full path to the python interpreter to be used in the new environment(when I do not want to use the default python version):

     $ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate removes the 'bin' directory of the environment activated with 'source activate' from PATH. 

    Unlike virtualenv, virtualenvwrapper will create the environment at the location specified by the $WORKON_HOME environment variable. That keeps all your environments in one place.

  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

    $ which pip

to see what version of python that is. If you see something like:

 $ which pip /usr/local/bin/pip 

then do:

$ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

You can see the python version in the output.

By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

$ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

http://docs.python-guide.org/en/latest/dev/virtualenvs/

virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  1. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

    /usr/local/bin

  2. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

========VIRTUALENVWRAPPER=========

  1. I had some problems getting virtualenvwrapper to work. This is what I ended up putting in ~/.bash_profile:

    export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #Virtualenvwrapper installation snow leopard python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh

  2. The -p option works differently with virtualenvwrapper: I have to specify the full path to the python interpreter to be used in the new environment(when I do not want to use the default python version):

    $ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate

    removes the 'bin' directory of the environment activated with 'source activate' from PATH.

Unlike virtualenv, virtualenvwrapper will create the environment at the location specified by the $WORKON_HOME environment variable. That keeps all your environments in one place.

added 152 characters in body
Source Link
muru
  • 5k
  • 1
  • 38
  • 84
  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

     $ which pip 

    $ which pipto see what version of python that is. If you see something like:

     $ which pip /usr/local/bin/pip 

    then do:

     $ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

    You can see the python version in the output.

    By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

     $ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

    virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

    http://docs.python-guide.org/en/latest/dev/virtualenvs/

    virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  2. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

     /usr/local/bin 
  3. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

to see what version of python that is. If you see something like:

 $ which pip /usr/local/bin/pip 

then do:

$ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

You can see the python version in the output.

By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

$ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

http://docs.python-guide.org/en/latest/dev/virtualenvs/

virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  1. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

    /usr/local/bin

  2. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

========VIRTUALENVWRAPPER=========

Virtualenvwrapper

  1. I had some problems getting virtualenvwrapper to work. This is what I ended up putting in ~/.bash_profile:

    export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #Virtualenvwrapper installation snow leopard python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh

     export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #http://stackoverflow.com/questions/19665327/virtualenvwrapper-installation-snow-leopard-python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh 
  2. The -p option works differently with virtualenvwrapper: I have to specify the full path to the python interpreter to be used in the new environment(when I do not want to use the default python version):

     $ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate removes the 'bin' directory of the environment activated with 'source activate' from PATH. 

    $ mkvirtualenv -p /usr/local/bin/python3.2 my_env RunningUnlike virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate

    removesvirtualenvwrapper will create the 'bin' directory ofenvironment at the location specified by the $WORKON_HOME environment activated with 'source activate' from PATHvariable. That keeps all your environments in one place.

Unlike virtualenv, virtualenvwrapper will create the environment at the location specified by the $WORKON_HOME environment variable. That keeps all your environments in one place.

  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

    $ which pip

to see what version of python that is. If you see something like:

 $ which pip /usr/local/bin/pip 

then do:

$ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

You can see the python version in the output.

By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

$ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

http://docs.python-guide.org/en/latest/dev/virtualenvs/

virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  1. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

    /usr/local/bin

  2. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

========VIRTUALENVWRAPPER=========

  1. I had some problems getting virtualenvwrapper to work. This is what I ended up putting in ~/.bash_profile:

    export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #Virtualenvwrapper installation snow leopard python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh

  2. The -p option works differently with virtualenvwrapper: I have to specify the full path to the python interpreter to be used in the new environment(when I do not want to use the default python version):

    $ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate

    removes the 'bin' directory of the environment activated with 'source activate' from PATH.

Unlike virtualenv, virtualenvwrapper will create the environment at the location specified by the $WORKON_HOME environment variable. That keeps all your environments in one place.

  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

     $ which pip 

    to see what version of python that is. If you see something like:

     $ which pip /usr/local/bin/pip 

    then do:

     $ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

    You can see the python version in the output.

    By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

     $ virtualenv -p python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3.2 New python executable in my_env/bin/python Installing setuptools, pip...done. 

    virtualenv my_env will create a folder in the current directory which will contain the Python executable files, and a copy of the pip [command] which you can use to install other packages.

    http://docs.python-guide.org/en/latest/dev/virtualenvs/

    virtualenv just copies python from a location on your computer into the newly created my_env/bin/ directory.

  2. The system python is in /usr/bin, while the various python versions I installed were, by default, installed into:

     /usr/local/bin 
  3. The various pythons I installed have names like python2.7 or python3.2, and I can use those names rather than full paths.

Virtualenvwrapper

  1. I had some problems getting virtualenvwrapper to work. This is what I ended up putting in ~/.bash_profile:

     export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/django_projects #Not very important -- mkproject command uses this #Added the following based on: #http://stackoverflow.com/questions/19665327/virtualenvwrapper-installation-snow-leopard-python export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 #source /usr/local/bin/virtualenvwrapper.sh source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh 
  2. The -p option works differently with virtualenvwrapper: I have to specify the full path to the python interpreter to be used in the new environment(when I do not want to use the default python version):

     $ mkvirtualenv -p /usr/local/bin/python3.2 my_env Running virtualenv with interpreter /usr/local/bin/python3 New python executable in my_env/bin/python Installing setuptools, pip...done. Usage: source deactivate removes the 'bin' directory of the environment activated with 'source activate' from PATH. 

    Unlike virtualenv, virtualenvwrapper will create the environment at the location specified by the $WORKON_HOME environment variable. That keeps all your environments in one place.

added 310 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python (you. You can do

    $ which pip

to see what version of python that is). If you see something like:

 $ which pip /usr/local/bin/pip 

then do:

$ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

You can see the python version in the output. 

By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python (you can do

    $ which pip

to see what version of python that is). By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

  1. When you do pip install virtualenv, the pip command is associated with one of your python versions, and virtualenv gets installed into that version of python. You can do

    $ which pip

to see what version of python that is. If you see something like:

 $ which pip /usr/local/bin/pip 

then do:

$ ls -al /usr/local/bin/pip lrwxrwxr-x 1 root admin 65 Apr 10 2015 /usr/local/bin/pip -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pip 

You can see the python version in the output. 

By default, that will be the version of python that is used for any new environment you create. However, you can specify any version of python installed on your computer to use inside a new environment with the -p flag:

Rollback to Revision 12
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 3 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
deleted 2 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
deleted 1 character in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 18 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
deleted 5 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 1 character in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 4 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 43 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 43 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 43 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 8 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
added 4 characters in body
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading
Source Link
7stud
  • 48.8k
  • 14
  • 107
  • 136
Loading