Python 尝试安装 qrcode-0.2.1 时出现“无法找到 vcvarsall.bat”错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3879014/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 13:09:26  来源:igfitidea点击:

"Unable to find vcvarsall.bat" error when trying to install qrcode-0.2.1

pythoninstallationqr-code

提问by manu

Please help me to solve this error

请帮我解决这个错误

C:\Python26\Lib\site-packages\pyqrcode\encoder>python setup.py install
running install
running bdist_egg
running egg_info
writing qrcode.egg-info\PKG-INFO
writing top-level names to qrcode.egg-info\top_level.txt
writing dependency_links to qrcode.egg-info\dependency_links.txt
package init file 'qrcode\__init__.py' not found (or not a regular file)
writing manifest file 'qrcode.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'qrcode.Encoder' extension
error: Unable to find vcvarsall.bat

Thanks,

谢谢,

manu

马努

回答by Wok

This was a known bug, and should not be an issue anymore.

这是一个已知错误,不应再成为问题。

If using MinGW, try:

如果使用 MinGW,请尝试:

setup.py install build ––compiler=mingw32

回答by pyfunc

Distutils does not play well with MS Compiler tool chain.

Distutils 不能很好地与 MS Compiler 工具链配合使用。

This file is required to setup the environment which will help distutils to use MS compiler tool chains.

需要此文件来设置有助于 distutils 使用 MS 编译器工具链的环境。

There are quite a few ways in which this has been made to work.

有很多方法可以使这一点发挥作用。

Please look at the following post which may help you.

请查看以下帖子,它可能对您有所帮助。

?The link goes to archive.org, since the original pagewent away.

? 链接转到archive.org,因为原始页面消失了。