0% found this document useful (0 votes)
171 views7 pages

Powers Hell

The document discusses installing pip and creating virtual environments in Windows PowerShell. Easy_install is used to install pip. The virtualenv module is then used to create virtual environments, but errors occur when trying to activate them due to unsupported commands.

Uploaded by

Alvian Dwi K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views7 pages

Powers Hell

The document discusses installing pip and creating virtual environments in Windows PowerShell. Easy_install is used to install pip. The virtualenv module is then used to create virtual environments, but errors occur when trying to activate them due to unsupported commands.

Uploaded by

Alvian Dwi K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

Windows PowerShell

Copyright (C) 2009 Microsoft Corporation. All rights reserved.


PS C:\Windows\system32> easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 1.5.6
Downloading https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=0
1026f87978932060cc86c1dc527903e
Processing pip-1.5.6.tar.gz
Writing c:\users\alvian\appdata\local\temp\easy_install-lrgqrz\pip-1.5.6\setup.c
fg
Running pip-1.5.6\setup.py -q bdist_egg --dist-dir c:\users\alvian\appdata\local
\temp\easy_install-lrgqrz\pip-1.5.6\egg-
dist-tmp-vwvjme
warning: no files found matching 'pip\cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'do
cs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Adding pip 1.5.6 to easy-install.pth file
Installing pip-script.py script to C:\Python27\Scripts
Installing pip.exe script to C:\Python27\Scripts
Installing pip.exe.manifest script to C:\Python27\Scripts
Installing pip2.7-script.py script to C:\Python27\Scripts
Installing pip2.7.exe script to C:\Python27\Scripts
Installing pip2.7.exe.manifest script to C:\Python27\Scripts
Installing pip2-script.py script to C:\Python27\Scripts
Installing pip2.exe script to C:\Python27\Scripts
Installing pip2.exe.manifest script to C:\Python27\Scripts
Installed c:\python27\lib\site-packages\pip-1.5.6-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
PS C:\Windows\system32> pip install virtualenv
Downloading/unpacking virtualenv
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...
PS C:\Windows\system32> mkvirtualenv tes
The term 'mkvirtualenv' is not recognized as the name of a cmdlet, function, scr
ipt file, or operable program. Check th
e spelling of the name, or if a path was included, verify that the path is corre
ct and try again.
At line:1 char:13
+ mkvirtualenv <<<< tes
+ CategoryInfo : ObjectNotFound: (mkvirtualenv:String) [], CommandN
otFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> virtualenv
You must provide a DEST_DIR
Usage: virtualenv [OPTIONS] DEST_DIR
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose Increase verbosity.
-q, --quiet Decrease verbosity.
-p PYTHON_EXE, --python=PYTHON_EXE
The Python interpreter to use, e.g.,
--python=python2.5 will use the python2.5 interpreter
to create the new environment. The default is the
interpreter that virtualenv was installed with
(C:\Python27\python.exe)
--clear Clear out the non-root install and start from scratch.
--no-site-packages DEPRECATED. Retained only for backward compatibility.
Not having access to global site-packages is now the
default behavior.
--system-site-packages
Give the virtual environment access to the global
site-packages.
--always-copy Always copy files rather than symlinking.
--unzip-setuptools Unzip Setuptools when installing it.
--relocatable Make an EXISTING virtualenv environment relocatable.
This fixes up scripts and makes all .pth files
relative.
--no-setuptools Do not install setuptools (or pip) in the new
virtualenv.
--no-pip Do not install pip in the new virtualenv.
--extra-search-dir=DIR
Directory to look for setuptools/pip distributions in.
This option can be used multiple times.
--never-download DEPRECATED. Retained only for backward compatibility.
This option has no effect. Virtualenv never downloads
pip or setuptools.
--prompt=PROMPT Provides an alternative prompt prefix for this
environment.
--setuptools DEPRECATED. Retained only for backward compatibility.
This option has no effect.
--distribute DEPRECATED. Retained only for backward compatibility.
This option has no effect.
PS C:\Windows\system32> virtualenv tes
New python executable in tes\Scripts\python.exe
Installing setuptools, pip...done.
PS C:\Windows\system32> workon
The term 'workon' is not recognized as the name of a cmdlet, function, script fi
le, or operable program. Check the spel
ling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:7
+ workon <<<<
+ CategoryInfo : ObjectNotFound: (workon:String) [], CommandNotFoun
dException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> virtualenv workon
New python executable in workon\Scripts\python.exe
Installing setuptools, pip...done.
PS C:\Windows\system32> virtualenv
You must provide a DEST_DIR
Usage: virtualenv [OPTIONS] DEST_DIR
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose Increase verbosity.
-q, --quiet Decrease verbosity.
-p PYTHON_EXE, --python=PYTHON_EXE
The Python interpreter to use, e.g.,
--python=python2.5 will use the python2.5 interpreter
to create the new environment. The default is the
interpreter that virtualenv was installed with
(C:\Python27\python.exe)
--clear Clear out the non-root install and start from scratch.
--no-site-packages DEPRECATED. Retained only for backward compatibility.
Not having access to global site-packages is now the
default behavior.
--system-site-packages
Give the virtual environment access to the global
site-packages.
--always-copy Always copy files rather than symlinking.
--unzip-setuptools Unzip Setuptools when installing it.
--relocatable Make an EXISTING virtualenv environment relocatable.
This fixes up scripts and makes all .pth files
relative.
--no-setuptools Do not install setuptools (or pip) in the new
virtualenv.
--no-pip Do not install pip in the new virtualenv.
--extra-search-dir=DIR
Directory to look for setuptools/pip distributions in.
This option can be used multiple times.
--never-download DEPRECATED. Retained only for backward compatibility.
This option has no effect. Virtualenv never downloads
pip or setuptools.
--prompt=PROMPT Provides an alternative prompt prefix for this
environment.
--setuptools DEPRECATED. Retained only for backward compatibility.
This option has no effect.
--distribute DEPRECATED. Retained only for backward compatibility.
This option has no effect.
PS C:\Windows\system32> virtualenv activate tes
There must be only one argument: DEST_DIR (you gave activate tes)
Usage: virtualenv [OPTIONS] DEST_DIR
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose Increase verbosity.
-q, --quiet Decrease verbosity.
-p PYTHON_EXE, --python=PYTHON_EXE
The Python interpreter to use, e.g.,
--python=python2.5 will use the python2.5 interpreter
to create the new environment. The default is the
interpreter that virtualenv was installed with
(C:\Python27\python.exe)
--clear Clear out the non-root install and start from scratch.
--no-site-packages DEPRECATED. Retained only for backward compatibility.
Not having access to global site-packages is now the
default behavior.
--system-site-packages
Give the virtual environment access to the global
site-packages.
--always-copy Always copy files rather than symlinking.
--unzip-setuptools Unzip Setuptools when installing it.
--relocatable Make an EXISTING virtualenv environment relocatable.
This fixes up scripts and makes all .pth files
relative.
--no-setuptools Do not install setuptools (or pip) in the new
virtualenv.
--no-pip Do not install pip in the new virtualenv.
--extra-search-dir=DIR
Directory to look for setuptools/pip distributions in.
This option can be used multiple times.
--never-download DEPRECATED. Retained only for backward compatibility.
This option has no effect. Virtualenv never downloads
pip or setuptools.
--prompt=PROMPT Provides an alternative prompt prefix for this
environment.
--setuptools DEPRECATED. Retained only for backward compatibility.
This option has no effect.
--distribute DEPRECATED. Retained only for backward compatibility.
This option has no effect.
PS C:\Windows\system32> activate tes
The term 'activate' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the sp
elling of the name, or if a path was included, verify that the path is correct a
nd try again.
At line:1 char:9
+ activate <<<< tes
+ CategoryInfo : ObjectNotFound: (activate:String) [], CommandNotFo
undException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> .\tes\Scripts\activate
(tes) PS C:\Windows\system32> .\tes\Scripts\deactivate
(tes) PS C:\Windows\system32> .\tes\Scripts\deactivate
(tes) PS C:\Windows\system32>
(tes) PS C:\Windows\system32> deactivate
PS C:\Windows\system32> .\tes\Scripts\activate
(tes) PS C:\Windows\system32> deactivate
PS C:\Windows\system32> pip install virtualenvwrapper-powershell
Downloading/unpacking virtualenvwrapper-powershell
Downloading virtualenvwrapper-powershell-12.7.8.zip
Running setup.py (path:c:\users\alvian\appdata\local\temp\pip_build_Alvian\vir
tualenvwrapper-powershell\setup.py) egg_
info for package virtualenvwrapper-powershell
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0
.6.10.tar.gz
Extracting in c:\users\alvian\appdata\local\temp\tmpdhypat
Now working in c:\users\alvian\appdata\local\temp\tmpdhypat\distribute-0.6.1
0
Building a Distribute egg in c:\users\alvian\appdata\local\temp\pip_build_Al
vian\virtualenvwrapper-powershell
c:\users\alvian\appdata\local\temp\pip_build_Alvian\virtualenvwrapper-powers
hell\distribute-0.6.10-py2.7.egg
warning: no files found matching '*.rst' under directory 'docs'
warning: no files found matching '*.py' under directory 'docs'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.txt' under directory 'docs'
Installing collected packages: virtualenvwrapper-powershell
Running setup.py install for virtualenvwrapper-powershell
warning: no files found matching '*.rst' under directory 'docs'
warning: no files found matching '*.py' under directory 'docs'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.txt' under directory 'docs'
Successfully installed virtualenvwrapper-powershell
Cleaning up...
PS C:\Windows\system32> workon
The term 'workon' is not recognized as the name of a cmdlet, function, script fi
le, or operable program. Check the spel
ling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:7
+ workon <<<<
+ CategoryInfo : ObjectNotFound: (workon:String) [], CommandNotFoun
dException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32> $env:WORKON_HOME="~/Envs"
PS C:\Windows\system32> mkdir $env:WORKON_HOME
Directory: C:\Users\Alvian
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 10/2/2014 3:44 PM Envs
PS C:\Windows\system32> import-module virtualenvwrapper
PS C:\Windows\system32> workon
PS C:\Windows\system32> mkvirtualenv blog
New python executable in blog\Scripts\python.exe
Installing setuptools, pip...done.
The argument '~\Envs\VEW_PreMakeVirtualEnv.ps1' to the -File parameter does not
exist. Provide the path to an existing '
.ps1' file as an argument to the -File parameter.
Added activation script por Powershell to ~/Envs/blog\Scripts.
The argument '~\Envs\VEW_PreActivateVirtualEnv.ps1' to the -File parameter does
not exist. Provide the path to an existi
ng '.ps1' file as an argument to the -File parameter.
(blog)PS C:\Windows\system32> deactivate
PS C:\Windows\system32> workon
PathInfo Name PathToScripts
PathToSitePackages
-------- ---- -------------
------------------
blog blog C:\Users\Alvian\Envs
\blog\... C:\Users\Alvian\Envs\blog\...
PS C:\Windows\system32> mkvirtualenv shop
New python executable in shop\Scripts\python.exe
Installing setuptools, pip...done.
The argument '~\Envs\VEW_PreMakeVirtualEnv.ps1' to the -File parameter does not
exist. Provide the path to an existing '
.ps1' file as an argument to the -File parameter.
Added activation script por Powershell to ~/Envs/shop\Scripts.
The argument '~\Envs\VEW_PreActivateVirtualEnv.ps1' to the -File parameter does
not exist. Provide the path to an existi
ng '.ps1' file as an argument to the -File parameter.
(shop)PS C:\Windows\system32> pip
Usage:
pip <command> [options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip DEPRECATED. Zip individual packages.
unzip DEPRECATED. Unzip individual packages.
bundle DEPRECATED. Create pybundles.
help Show help for commands.
General Options:
-h, --help Show help.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log-file <path> Path to a verbose non-appending log, that only
logs failures. This log is active by default at
C:\Users\Alvian\pip\pip.log.
--log <path> Path to a verbose appending log. This log is
inactive by default.
--proxy <proxy> Specify a proxy in the form
[user:passwd@]proxy.server:port.
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup.
--cert <path> Path to alternate CA bundle.
(shop)PS C:\Windows\system32> deactivate
PS C:\Windows\system32> workon blog
The argument '~\Envs\VEW_PreActivateVirtualEnv.ps1' to the -File parameter does
not exist. Provide the path to an existi
ng '.ps1' file as an argument to the -File parameter.
(blog)PS C:\Windows\system32> pip install djanggo
Downloading/unpacking djanggo
Could not find any downloads that satisfy the requirement djanggo
Cleaning up...
No distributions at all found for djanggo
Storing debug log for failure in C:\Users\Alvian\pip\pip.log
(blog)PS C:\Windows\system32> pip install django
Downloading/unpacking django
Installing collected packages: django
Successfully installed django
Cleaning up...
(blog)PS C:\Windows\system32>

You might also like