烧瓶安装不能正常工作 [英] Flask installation doesn't work properly

查看:135
本文介绍了烧瓶安装不能正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Merverick OSX。我已经安装Python 3.3.3进入我的电脑,我想安装Flask



当我在终端中键入这个

  $ sudo easy_install virtualenv 

终端显示此错误我

 错误:无法创建或删除安装目录中的文件

发生以下错误试图添加或删除
安装目录中的文件:

[Errno 13] Permission denied:'/Library/Python/2.7/site-packages/test-easy-install-
373.write-test'

您指定的安装目录(通过--install-dir,--prefix或
distutils默认设置)为:

/Library/Python/2.7/site-packages/

也许您的帐户没有对此目录的写入权限?如果
安装目录是系统拥有的目录,则可能需要以管理员或root帐户登录
。如果您没有管理员
访问此计算机,则可能希望选择不同的安装
目录,最好是您的PYTHONPATH环境
变量中列出的一个目录。

有关其他选项的信息,您可以参考
文档:

http://peak.telecommunity.com/EasyInstall.html

请为您的系统进行相应的更改,然后重试。

所以我以root用户身份访问,然后键入

  $ sudo easy_install virtualenv 

这个,但是有一个关于* .egg的警告是什么?出了什么问题?以及如何解决它?

 上次登入:Wed Nov 13 16:10:17 on ttys000 
Tammarats-MacBook -Air:Team $ su root
密码:
sh-3.2#$ sudo easy_install virtualenv
搜索virtualenv
阅读http://pypi.python.org/simple/ virtualenv /
最佳匹配:virtualenv 1.10.1
正在下载https://pypi.python.org/packages/source/v/virtualenv/virtualenv-
1.10.1.tar.gz# md5 = 3a04aa2b32c76c83725ed4d9918e362e
处理virtualenv-1.10.1.tar.gz
运行virtualenv-1.10.1 / setup.py -q bdist_egg --dist-dir / tmp / easy_install-
Nl7IVa / virtualenv-1.10.1 / egg-dist-tmp-QGa1nR
警告:在目录'virtualenv_support'下找不到与'* .egg'匹配的文件
警告:没有找到匹配'*'的以前包含的文件目录
'docs / _templates'
警告:在目录'docs / _build'下找不到以前包含的匹配'*'的文件
将virtualenv 1.10.1添加到easy-install.pth文件
安装将virtualenv脚本安装到/ usr / local / bin
将virtualenv-2.7脚本安装到/ usr / local / bin

已安装/Library/Python/2.7/site-packages/virtualenv-1.10.1 -py2.7.egg
处理virtualenv的相关性
完成virtualenv的处理相关性
sh-3.2#


解决方案

每当我们遇到任何事情时,我们都不能这样做,我们应该阅读讲解的细节
是否找到WARNING ,它告诉你这不是错误;和

 已安装/Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg 
为virtualenv处理依赖关系
完成对virtualenv的处理依赖关系

说实话的是,已成功安装virtualenv。
现在你可以根据Flask给出的文档,学习Flask;

I'm using Merverick OSX. I have installed Python 3.3.3 Into my computer and I would like to install Flask

When I type this in terminal

$sudo easy_install virtualenv

terminal shows this error to me

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-    
373.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.

So I have access as root user and then type

$sudo easy_install virtualenv

and it says like this but there is a warning about *.egg what is that? something goes wrong? and how to fix it?

Last login: Wed Nov 13 16:10:17 on ttys000
Tammarats-MacBook-Air:~ Team$ su root
Password:
sh-3.2# $sudo easy_install virtualenv
Searching for virtualenv
Reading http://pypi.python.org/simple/virtualenv/
Best match: virtualenv 1.10.1
Downloading https://pypi.python.org/packages/source/v/virtualenv/virtualenv-   
1.10.1.tar.gz#md5=3a04aa2b32c76c83725ed4d9918e362e
Processing virtualenv-1.10.1.tar.gz
Running virtualenv-1.10.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-  
Nl7IVa/virtualenv-1.10.1/egg-dist-tmp-QGa1nR
warning: no files found matching '*.egg' under directory 'virtualenv_support'
warning: no previously-included files matching '*' found under directory  
'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Adding virtualenv 1.10.1 to easy-install.pth file
Installing virtualenv script to /usr/local/bin
Installing virtualenv-2.7 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv
sh-3.2# 

解决方案

Every time when we meet anything we cannot undestand like this, we should read the explainin detail。 did you find the "WARNING", it tell you it's not error; and

  Installed /Library/Python/2.7/site-packages/virtualenv-1.10.1-py2.7.egg    
  Processing dependencies for virtualenv
  Finished processing dependencies for virtualenv

tell the truth is that you have installed virtualenv successfully. Now you can according the docs given by Flask, learn Flask;

这篇关于烧瓶安装不能正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆