Failed to install zbar with pip on Windows

别说谁变了你拦得住时间么 提交于 2019-12-01 22:14:05

You are trying to install zbar package with pip. When doing so, pip downloads the source and tries to compile the C/C++ source code of this project.

To do such a thing, you need a C/C++ compiler and having all dependencies. It may be complicated to have pip compiles this package.

The other solution is to download a binary wheel that embeds all binaries. zbar developers propose to download a binary wheel from their GitHub webpage

You can download this binary wheel, that targets a Windows Python 2.7 64 bit installation.

All you have to do is:

  • open a Windows cli with Windows+R and by running inside cmd
  • go to the directory where you have downloaded the whl file, with cd instructions
  • run pip install zbar-0.10-cp27-none-win_amd64.whl

For example, the command can be

pip install zbar-0.10-cp27-none-win_amd64.whl

If you have several Python installations, make sure to use the correct pip program.

You can do it for any package with some code that has to be compiled

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!