﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>学习日记 &#187; python</title>
	<atom:link href="https://www.softwareace.cn/?cat=101&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://www.softwareace.cn</link>
	<description>时刻想着为自己的产品多做一些对他好的事情</description>
	<lastBuildDate>Fri, 20 Mar 2026 06:58:28 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>windows下安装python虚拟机环境virtualenv</title>
		<link>https://www.softwareace.cn/?p=864</link>
		<comments>https://www.softwareace.cn/?p=864#comments</comments>
		<pubDate>Fri, 11 Jul 2014 09:56:43 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=864</guid>
		<description><![CDATA[下载安装Python2.7.3 到python官方网站下载windows版本的python，点击可以直接安装， [&#8230;]]]></description>
				<content:encoded><![CDATA[<h3>下载安装Python2.7.3</h3>
<p>到python官方网站下载windows版本的python，点击可以直接安装，这里我安装在<code>D:\Python27</code>下</p>
<h3>安装setuptools</h3>
<p>为了支持easy_install等脚本，安装完Python后要安装<a href="http://pypi.python.org/pypi/setuptools#files">setuptools-0.6c11.win32-py2.7.exe</a></p>
<p>然后把python的目录添加到Windows的环境变量path中。</p><pre class="crayon-plain-tag">;D:\Python27;D:\Python27\Scripts</pre><p></p>
<h3>安装virtualenv</h3>
<p>在控制台中输入命令</p><pre class="crayon-plain-tag">D:\pyproj&amp;gt;easy_install virtualenv</pre><p></p>
<h3>创建虚拟环境</h3>
<p>在项目的目录下运行下面命令：</p><pre class="crayon-plain-tag">D:\pyproj\flasktes&amp;gt;virtualenv env
New python executable in env\Scripts\python.ex
Installing setuptools................done.
Installing pip...................done.</pre><p></p>
<h3>使用虚拟环境</h3>
<p>在项目的Scripts目录下运行下面命令</p><pre class="crayon-plain-tag">D:\pyproj\flasktes\env\Scripts&amp;gt;activate
(env) D:\pyproj\flasktes\env\Scripts&amp;gt;</pre><p></p>
<h3>在eclipse的pydev插件下开发</h3>
<p>使用pydev开发时，要选择虚拟环境下的python解释器。</p>
<p><img alt="图1" src="http://liufeiyu.cn/assets/postimg/pydev.jpg" /></p>
<p>但是出现了以下的错误： <img alt="图2" src="http://liufeiyu.cn/assets/postimg/pydev2.jpg" /></p>
<p>应该错误提示很明显，因为我使用的虚拟环境下的python，所以它需要加载安装python目录下的lib文件夹下的包，所以还要加上下面圈起来的目录。 <img alt="图3" src="http://liufeiyu.cn/assets/postimg/pydev3.jpg" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=864</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
