错误安装烧瓶在windows下virutalenv - [错误2]系统找不到指定的文件 [英] falied to install flask under virutalenv on windows -- [Error 2] The system cannot find the file specified

查看:940
本文介绍了错误安装烧瓶在windows下virutalenv - [错误2]系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




然而,在我创建了一个virtualenv之后,我试图做同样的事情时遇到了错误。

脚本:

  $ pip install virtualenv 
$ cd / dd:
$ mkdir test
$ cd test
$ virtualenv flaskEnv
$ cd flaskEnv / Scritps /
$ activate
$ cd ../ ../
$ pip install flask

如下所示的日志文件:

 收集烧瓶
使用缓存Flask-0.11.1-py2.py3-none-any.whl
Requirement already satisfied(使用--upgrade升级):在c:\projects\flask-react\flsk\lib\site-packages(from flask)中点击> = 2.0
Requirement already satisfied(use --upgrade (从烧瓶)
收集Jinja2> = 2.4(从烧瓶)
使用缓存的Jinja2-2.8-py2.py3-none-any.whl
收集其危险性> = 0.21(从烧瓶)
收集MarkupSafe(从Jinja2> = 2.4->烧瓶)
使用缓存的MarkupSafe-0.23.tar.gz
为colle构建轮子
为MarkupSafe运行setup.py bdist_wheel:启动
为MarkupSafe运行setup.py bdist_wheel:以状态error结束
完成命令c:\projects\的输出flask-react \flsk\scripts\python.exe -u -cimport setuptools,tokenize; __ file __ ='c:\\\\ users \\\\\\\\\ (编译(getattr(tokenize,'open',open)(__ file __)。read()); .replace('\r\\\
','\\\
'),__file__,'exec'))bdist_wheel -dc:\users\admini〜1 \appdata\local\temp\ tmp8mkr70pip-wheel- --python-tag cp27:
运行bdist_wheel
运行编译
运行build_py
创建编译
编译build\lib.win32-2.7
创建build\lib.win32-2.7\markupsafe
复制markupsafe\tests.py - > build \lib.win32-2.7\markupsafe
复制markupsafe\_compat.py - > build \lib.win32-2.7\markupsafe
复制markupsafe\_constants.py - > build\lib.win32-2.7\markupsafe
复制markupsafe\_native.py - > build \lib.win32-2.7\markupsafe
复制markupsafe\__init __。py - > build\lib.win32-2.7\markupsafe
运行egg_info
编写MarkupSafe.egg-info\PKG-INFO
将顶级名称写入MarkupSafe.egg-info\top_level .txt
将依赖关系链接写入MarkupSafe.egg-info\dependency_links.txt
警告:manifest_maker:标准文件'-c'找不到

读取清单文件'MarkupSafe.egg -info\SOURCES.txt'
阅读清单模板'MANIFEST.in'
编写清单文件'MarkupSafe.egg-info\SOURCES.txt'
复制markupsafe\_speedups.c - > build\lib.win32-2.7\markupsafe
正在运行build_ext
建立markupsafe._speedups扩展名
错误:[错误2]系统找不到指定的文件

----------------------------------------
运行设置。 py clean for MarkupSafe
无法构建MarkupSafe
安装收集的包:MarkupSafe,Jinja2,itsdangerous,flask
运行setup.py安装MarkupSafe:启动
运行setup.py安装MarkupSafe:完成状态错误
完成命令输出c:\ project \flask-react\flsk\scripts\python.exe -u -cimport setuptools,tokenize; __ file __ =' C:\\users\\admini〜1\\appdata\\local\\temp\\pip - 建造 - 3ep417\\MarkupSafe\\setup.py '; exec(compile(getattr(tokenize,'open',open)(__ file __).read().export('\r\\\
','\\\
'),__file__,'exec'))安装 - 记录c:\ users \admini~1 \appdata\local\temp\pip-8v3_ep-record\install-record.txt --single-version-external-managed -compile --install-头文件c:\projects\flask-react\flsk\include\site\python2.7\MarkupSafe:
正在运行安装
正在运行生成
正在运行build_py
创建build
创建build\lib.win32-2.7
创建build\lib.win32-2.7\markupsafe
复制markupsafe\tests.py - > build \lib.win32-2.7\markupsafe
复制markupsafe\_compat.py - > build \lib.win32-2.7\markupsafe
复制markupsafe\_constants.py - > build\lib.win32-2.7\markupsafe
复制markupsafe\_native.py - > build \lib.win32-2.7\markupsafe
复制markupsafe\__init __。py - > build\lib.win32-2.7\markupsafe
运行egg_info
编写MarkupSafe.egg-info\PKG-INFO
将顶级名称写入MarkupSafe.egg-info\top_level .txt
将依赖关系链接写入MarkupSafe.egg-info \dependency_links.txt
警告:manifest_maker:标准文件'-c'找不到

读取清单文件'MarkupSafe.egg -info\SOURCES.txt'
阅读清单模板'MANIFEST.in'
编写清单文件'MarkupSafe.egg-info\SOURCES.txt'
复制markupsafe\_speedups.c - > build\lib.win32-2.7\markupsafe
正在运行build_ext
建立markupsafe._speedups扩展名
错误:[错误2]系统找不到指定的文件

错误讯息是否对任何人有意义?
thanks

解决方案

这个问题似乎与在virtualenv中安装的setuptools版本有关。降级到一个较旧的版本修复了它。



从您的virtualenv:

  pip install setuptools == 21.2.1 
pip install flask


I'm using python 2.7 on a windows box.I'm able to install flask using pip install, as you can see below:

However, after I created a virtualenv, I got below error when trying to do the same thing.

scripts:

$pip install virtualenv  
$cd /d d:
$mkdir test
$cd test
$virtualenv  flaskEnv
$cd flaskEnv/Scritps/
$activate
$cd ../../
$pip install flask

log file as below:

Collecting flask
  Using cached Flask-0.11.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): click>=2.0 in c:\projects\flask-react\flsk\lib\site-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in c:\projects\flask-react\flsk\lib\site-packages (from flask)
Collecting Jinja2>=2.4 (from flask)
  Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from flask)
Collecting MarkupSafe (from Jinja2>=2.4->flask)
  Using cached MarkupSafe-0.23.tar.gz
Building wheels for collected packages: MarkupSafe
  Running setup.py bdist_wheel for MarkupSafe: started
  Running setup.py bdist_wheel for MarkupSafe: finished with status 'error'
  Complete output from command c:\projects\flask-react\flsk\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\pip-build-3ep417\\MarkupSafe\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\admini~1\appdata\local\temp\tmp8mkr70pip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-2.7
  creating build\lib.win32-2.7\markupsafe
  copying markupsafe\tests.py -> build\lib.win32-2.7\markupsafe
  copying markupsafe\_compat.py -> build\lib.win32-2.7\markupsafe
  copying markupsafe\_constants.py -> build\lib.win32-2.7\markupsafe
  copying markupsafe\_native.py -> build\lib.win32-2.7\markupsafe
  copying markupsafe\__init__.py -> build\lib.win32-2.7\markupsafe
  running egg_info
  writing MarkupSafe.egg-info\PKG-INFO
  writing top-level names to MarkupSafe.egg-info\top_level.txt
  writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
  copying markupsafe\_speedups.c -> build\lib.win32-2.7\markupsafe
  running build_ext
  building 'markupsafe._speedups' extension
  error: [Error 2] The system cannot find the file specified

  ----------------------------------------
  Running setup.py clean for MarkupSafe
Failed to build MarkupSafe
Installing collected packages: MarkupSafe, Jinja2, itsdangerous, flask
  Running setup.py install for MarkupSafe: started
    Running setup.py install for MarkupSafe: finished with status 'error'
    Complete output from command c:\projects\flask-react\flsk\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\admini~1\\appdata\\local\\temp\\pip-build-3ep417\\MarkupSafe\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admini~1\appdata\local\temp\pip-8v3_ep-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\projects\flask-react\flsk\include\site\python2.7\MarkupSafe:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    creating build\lib.win32-2.7\markupsafe
    copying markupsafe\tests.py -> build\lib.win32-2.7\markupsafe
    copying markupsafe\_compat.py -> build\lib.win32-2.7\markupsafe
    copying markupsafe\_constants.py -> build\lib.win32-2.7\markupsafe
    copying markupsafe\_native.py -> build\lib.win32-2.7\markupsafe
    copying markupsafe\__init__.py -> build\lib.win32-2.7\markupsafe
    running egg_info
    writing MarkupSafe.egg-info\PKG-INFO
    writing top-level names to MarkupSafe.egg-info\top_level.txt
    writing dependency_links to MarkupSafe.egg-info\dependency_links.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'MarkupSafe.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'MarkupSafe.egg-info\SOURCES.txt'
    copying markupsafe\_speedups.c -> build\lib.win32-2.7\markupsafe
    running build_ext
    building 'markupsafe._speedups' extension
    error: [Error 2] The system cannot find the file specified

Does the error message mean something to anyone? thanks

解决方案

This issue seems to be related with the setuptools version installed in your virtualenv. Downgrading to an older version fixed it for me.

From your virtualenv:

pip install setuptools==21.2.1
pip install flask

这篇关于错误安装烧瓶在windows下virutalenv - [错误2]系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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