当前位置: 首页 > 面试题库 >

尝试安装Flask 0.9后的警告和错误

邢永安
2023-03-14
问题内容

我正在尝试安装Flask,但是我打赌所有这些警告和错误:

alex@alex-K43U:~/flask$ pip install Flask
Downloading/unpacking Flask
  Downloading Flask-0.9.tar.gz (481Kb): 481Kb downloaded
  Running setup.py egg_info for package Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Werkzeug>=0.7 (from Flask)
  Downloading Werkzeug-0.8.3.tar.gz (1.1Mb): 1.1Mb downloaded
  Running setup.py egg_info for package Werkzeug

    warning: no files found matching '*' under directory 'werkzeug/debug/templates'
    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
Downloading/unpacking Jinja2>=2.4 (from Flask)
  Downloading Jinja2-2.6.tar.gz (389Kb): 389Kb downloaded
  Running setup.py egg_info for package Jinja2

    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Installing collected packages: Flask, Werkzeug, Jinja2
  Running setup.py install for Flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
    error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/alex/flask/build/Flask/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-KD7NsY-record/install-record.txt:
    running install

running build

(a lot of creating and building)

error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied

有解决这个问题的建议吗?

我正在使用ubuntu 11.10。


问题答案:

你可以放心忽略的警告;但是这个错误:

error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied

告诉我你正在尝试将此安装到全局系统Python中。没问题,但是如果要这样做,则需要以提升的特权(使用sudo)运行命令。

最好使用虚拟环境,以免污染整个系统的Python安装。

使用虚拟环境:

$ virtualenv flask_env
$ source flask_env/bin/activate
(flask_env) $ pip install Flask

你可能应该首先使用以下命令安装virtualenv二进制文件: sudo apt-get install python-virtualenv



 类似资料:
  • 嗨,伙计们,我有两个问题 我收到这个警告消息。 为com.souq.marketplace构建有效模型时遇到了一些问题:selling-center-services:war:0 . 0 . 1-SNAPSHOT[WARNING]com . souq的“dependencies . dependency . system path”service manager:jar不应指向项目目录中的文件,$

  • 如果提到经常被开发者忽略的特性,那应该就是动态输出错误和提醒的功能了。事实上,Sass 自带三条自定义指令从标准输出系统(CLI,编译程序……)中打印内容: @debug; @warn; @error. 先让我们把 @debug 放一边,毕竟它主要是用作调试 SassScript,而这并不是我们的重点。然后我们就剩下了相互间没有明显差异的 @warn 和 @error,唯一的不同是其中一个可以中断

  • 我正在键入,但terminal给出了以下消息: checkPermissions缺少对/usr/local/lib/node_modules的写访问权npm错误!路径/usr/local/lib/node_modules npm错误!代码EACCES npm错误!错误-13 npm错误!syscall访问npm错误!错误:eAcces:权限被拒绝,访问'/usr/local/lib/node_mo

  • Boilerpipe是一个很好的Java程序,用于清理网页,我以前也使用过它。今天我注意到,许多用户无法安装Python包装器版本,并出现404和其他错误。这是我从康达那里复制的一个尝试。 /用户/邓肯 命令"pythonsetup.pyegg_info"失败,错误代码1在 /tmp/pip-r6swd0hy-build/ 我见过一些对我不起作用的解决方案(例如:谷歌改变了其模块的URL),如果有

  • 问题内容: 我需要捕捉一些从PHP本机函数抛出的警告,然后处理它们。 特别: DNS查询失败时,它将引发警告。 / 不起作用,因为警告也不例外。 我现在有2个选择: 似乎有点过分,因为我必须使用它来过滤页面中的每个警告(这是真的吗?); 调整错误报告/显示,以使这些警告不会在屏幕上显示,然后检查返回值;如果为,则找不到主机名的记录。 这里的最佳做法是什么? 问题答案: 设置和还原错误处理程序 一种

  • 安全告警即实时监测系统中的安全告警事件,如异常登录等,当发现安全问题后,将会及时通知管理员用户进行处理等。 安全告警即实时监测系统中的安全告警事件,如异常登录等,当发现安全问题后,将会及时通知管理员用户进行处理等。目前仅支持异常登录的安全告警事件,当用户连续登录失败后被锁定将会发送安全告警记录发送给锁定用户以及用户所在域的域管理员和系统管理员。 说明 管理后台下可以看到系统所有的安全告警记录; 域