PS D:\python> mkdir django1
디렉터리: D:\python
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2018-07-18 오후 4:03 django1
PS D:\python> cd .\django1
PS D:\python\django1> python -m venv django
PS D:\python\django1>
PS D:\python\django1> ls
디렉터리: D:\python\django1
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2018-07-18 오후 4:04 django
PS D:\python\django1> cd django
PS D:\python\django1\django> dir
디렉터리: D:\python\django1\django
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2018-07-18 오후 4:04 Include
d---- 2018-07-18 오후 4:04 Lib
d---- 2018-07-18 오후 4:05 Scripts
-a--- 2018-07-18 오후 4:04 120 pyvenv.cfg
PS D:\python\django1\django> cd .\Scripts
PS D:\python\django1\django\Scripts> dir
디렉터리: D:\python\django1\django\Scripts
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2018-07-18 오후 4:05 2284 activate
-a--- 2018-07-18 오후 4:05 1023 activate.bat
-a--- 2018-07-18 오후 4:05 1494 Activate.ps1
-a--- 2018-07-18 오후 4:05 368 deactivate.bat
-a--- 2018-07-18 오후 4:04 89470 easy_install-3.6.exe
-a--- 2018-07-18 오후 4:04 89470 easy_install.exe
-a--- 2018-07-18 오후 4:05 89442 pip.exe
-a--- 2018-07-18 오후 4:05 89442 pip3.6.exe
-a--- 2018-07-18 오후 4:05 89442 pip3.exe
-a--- 2018-07-18 오후 4:04 164504 pyexpat.pyd
-a--- 2018-07-18 오후 4:04 97944 python.exe
-a--- 2018-07-18 오후 4:04 58520 python3.dll
-a--- 2018-07-18 오후 4:04 3303064 python36.dll
-a--- 2018-07-18 오후 4:04 96408 pythonw.exe
-a--- 2018-07-18 오후 4:04 23704 select.pyd
-a--- 2018-07-18 오후 4:04 880792 sqlite3.dll
-a--- 2018-07-18 오후 4:04 1307136 tcl86t.dll
-a--- 2018-07-18 오후 4:04 1550336 tk86t.dll
-a--- 2018-07-18 오후 4:04 896152 unicodedata.pyd
-a--- 2018-07-18 오후 4:04 83784 vcruntime140.dll
-a--- 2018-07-18 오후 4:04 24728 winsound.pyd
-a--- 2018-07-18 오후 4:04 45720 _asyncio.pyd
-a--- 2018-07-18 오후 4:04 78488 _bz2.pyd
-a--- 2018-07-18 오후 4:04 102552 _ctypes.pyd
-a--- 2018-07-18 오후 4:04 30360 _ctypes_test.pyd
-a--- 2018-07-18 오후 4:04 216728 _decimal.pyd
-a--- 2018-07-18 오후 4:04 22168 _distutils_findvs.pyd
-a--- 2018-07-18 오후 4:04 163992 _elementtree.pyd
-a--- 2018-07-18 오후 4:04 1121432 _hashlib.pyd
-a--- 2018-07-18 오후 4:04 183960 _lzma.pyd
-a--- 2018-07-18 오후 4:04 33432 _msi.pyd
-a--- 2018-07-18 오후 4:04 25752 _multiprocessing.pyd
-a--- 2018-07-18 오후 4:04 34456 _overlapped.pyd
-a--- 2018-07-18 오후 4:04 63640 _socket.pyd
-a--- 2018-07-18 오후 4:04 64664 _sqlite3.pyd
-a--- 2018-07-18 오후 4:04 1459864 _ssl.pyd
-a--- 2018-07-18 오후 4:04 41624 _testbuffer.pyd
-a--- 2018-07-18 오후 4:04 76440 _testcapi.pyd
-a--- 2018-07-18 오후 4:04 21144 _testconsole.pyd
-a--- 2018-07-18 오후 4:04 19608 _testimportmultiple.pyd
-a--- 2018-07-18 오후 4:04 26264 _testmultiphase.pyd
-a--- 2018-07-18 오후 4:04 53400 _tkinter.pyd
PS D:\python\django1\django\Scripts> .\activate
(django) PS D:\python\django1\django\Scripts>
(django) PS D:\python\django1\django\Scripts> pip list
Package Version
---------- -------
pip 10.0.1
setuptools 39.0.1
(django) PS D:\python\django1\django\Scripts> pip install django
Collecting django
Downloading https://files.pythonhosted.org/packages/ab/15/cfde97943f0db45e4f999c60b696fbb4df59e82bbccc686770f4e44c9094
/Django-2.0.7-py3-none-any.whl (7.1MB)
100% |████████████████████████████████| 7.1MB 517kB/s
Collecting pytz (from django)
Using cached https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779
a/pytz-2018.5-py2.py3-none-any.whl
Installing collected packages: pytz, django
Successfully installed django-2.0.7 pytz-2018.5
(django) PS D:\python\django1\django\Scripts> pip list
Package Version
---------- -------
Django 2.0.7
pip 10.0.1
pytz 2018.5
setuptools 39.0.1
(django) PS D:\python\django1\django\Scripts>
※ 권한 문제로 윈도우에서 가상환경이 실행이 안될경우 아래명렁어 실행
cmd -> power shell 관리자 권한으로 실행
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\hdcho> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
실행 규칙 변경
실행 정책은 신뢰하지 않는 스크립트로부터 사용자를 보호해 줍니다. 실행 정책을 변경하면 about_Execution_Policies 도움말
항목에 설명된 보안 위험에 노출될 수 있습니다. 실행 정책을 변경하시겠습니까?
[Y] 예(Y) [N] 아니요(N) [S] 일시 중단(S) [?] 도움말 (기본값은 "Y"임): Y
'파이썬 python > django' 카테고리의 다른 글
django model 1 sqlite3 (0) | 2018.07.25 |
---|---|
django view , 간단한 뷰 구현 (0) | 2018.07.25 |
starproject , 접속 확인 (0) | 2018.07.19 |