在 virtualenv 中安装 Python 包需要 Microsoft Visual C++ 10.0 [英] Microsoft Visual C++ 10.0 required to install Python package in virtualenv

查看:50
本文介绍了在 virtualenv 中安装 Python 包需要 Microsoft Visual C++ 10.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过 pip 安装 bokeh Python 包,但我抛出了这个错误:

I was trying to install the bokeh Python package via pip but I was thrown this error:

 error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

我通过安装 Microsoft Visual C+ 修复了该错误,然后成功安装.

I fixed that error by installing Microsoft Visual C+ and installed successfully after that.

但是,现在我想在我用 virtualenv 创建的虚拟环境中安装 bokeh.我的意图是构建一个 Flask 应用.

However, now I want to install bokeh inside my virtual environment which I created with virtualenv. My intent is to build a Flask app.

我又犯了同样的错误,但这次我不知道该怎么办.

I got the same error again, but this time I have no idea what to do.

任何帮助将不胜感激.

推荐答案

面向未来的 google 用户/堆栈溢出用户.

for future google users / stack overflow users.

我遇到了类似的错误,但我需要 Visual C++ 14.0.在 venv 运行时尝试安装软件包时出现此错误(activate.bat 脚本已经运行)

I had a similar error, but I needed Visual C++ 14.0. This error popped up while trying to install a package while venv was running (with the activate.bat script already run)

显然更新设置工具是解决方案.我的意思是,当我使用 pip 卸载已卸载的 SoundCard并为声卡重新运行 setup.py,我没有收到关于 v14.0 丢失的更多错误.(这都是在 venv 运行的情况下进行的).

apparently updating setup tools was the solution. And by that I mean, when I used pip to uninstall uninstalled SoundCard and re-ran setup.py for SoundCard, I received no more errors about v14.0 missing. (This was all with venv running).

我已经在本地安装了 Visual C++ Redistributable 2015 v14.0.但是我的 venv 找不到它.

I already had Visual C++ Redistributable 2015 v14.0 installed locally. But my venv couldn't find it.

运行此命令以更新安装工具.

Run this command to update setuptools.

pip install --upgrade setuptools

我从 28.8.0 更新到 41.1.0 但下面的链接评论说 36.2.7 为他们工作.

I updated from 28.8.0 to 41.1.0 but the linked comment below says36.2.7 worked for them.

如果这对你有用,请给下面的评论一些爱.

If this worked for you, please give the comment below some love as well.

微软需要 Visual C++ 14.0(无法找到 vcvarsall.bat)

这篇关于在 virtualenv 中安装 Python 包需要 Microsoft Visual C++ 10.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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