为什么安装一些Python包需要Visual Studio?(Why does installation of some Python packages require Visual Studio?)

编程入门 行业动态 更新时间:2024-10-11 13:28:30
为什么安装一些Python包需要Visual Studio?(Why does installation of some Python packages require Visual Studio?)

比如说,你正在为pyEnchant或crfsuite等安装一个Python软件包。它无法安装,并且在错误追踪中它说缺少一些.bat (或.dll )文件。

有几个论坛建议你安装Visual Studio,还有一些人提供了诸如cygwin,mingw等的解决方法。

为什么一些Python包需要Visual Studio?

Say, you are installing a Python package for pyEnchant or crfsuite, etc. It fails to install and in the error trace it says some .bat (or .dll) file is missing.

A few forums suggest you install Visual Studio and a few others give work-arounds like cygwin, mingw, etc.

Why do some Python packages require Visual Studio?

最满意答案

为什么一些Python包需要Visual Studio?

从C编写的CPython扩展模块源代码安装需要C编译器。 Visual Studio提供了一个这样的编译器。

为了避免这种情况,请使用这些二进制安装程序。

此外,由于许可限制,扩展模块可能不会自动安装某些dll,并且您必须安装手动提供这些dll的Visual Studio。

Why do some Python packages require Visual Studio?

Installation from source of CPython extension modules written in C requires a C compiler. Visual Studio provides one such compiler.

To avoid it, use binary installers such as these.

Also, due to licensing restrictions, an extension module may not install some dlls automatically and you have to install Visual Studio that provides these dlls manually.

更多推荐

本文发布于:2023-07-27 02:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1284013.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Studio   Visual   Python   require   packages

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!