程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Windowsserver2008r2 Standard Edition installation Python environment

編輯:Python

Company use windows The server , To put python The program is deployed on the server

First configuration python Environmental Science

Download from the official website python Installation package :
python download
I chose 3.5.4 Of 64 Bit offline installation package , Download according to the system bits

Put the installation package on the server , Click on the right “ Run as administrator ”, If you do not run as an administrator, the system may prevent you from installing .

Remember to check Add Python 3.5 to PATH Omit the disgusting step of configuring environment variables .
Wait for the installation , open cmd, Input python

Successful installation python 3.5.4 The appearance of .
python It is recommended to install virtual environment .
Type... In the command window pip install virtualenvwrapper-win Install virtual environment management

installation is complete

Next, create a virtual environment :

mkvirtualenv Virtual environment name

Enter the virtual environment just created , Activate it :

cd Envs

function

workon Virtual environment name

Then you can do whatever you want in this virtual environment python The program installation package environment .

Finally, the setting for people with OCD : Customize the path of the virtual environment :
1 First add environment variables :
Computer – attribute - Advanced system setup – environment variable – newly build
Create a new system environment variable VIRTUALENV_HOME The value is the path you want to store , I'm going to set it to zero E:\Virtualenv

2 open python The installation path , find Script Folder , edit mkvitualenv.bat file :
Modify the following code :
Change the path defining the installation to the environment variable just set :
You can annotate the original as I did , Rewrite a line by yourself :
set "venvwrapper.default_workon_home=%VIRTUALENV_HOME%"

preservation , restart cmd window .
Carry out orders mkvirtualenv Virtual environment name The virtual environment will be created in the customized directory .

Activate the virtual environment :
cd To the virtual environment folder , find Script Folder , perform activate.bat
Exit virtual environment :
perform deactivete

This is about windows server 2008 r2 Standard version installation python This is where the article on environment is introduced , More about win2008 r2 install python Please search the previous articles of software development network or continue to browse the relevant articles below. I hope you will support software development network more in the future !



  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved