在windows 10种使用pip安装greenlet时,遇到下面这样一个错误,通过搜索发现有很多类似的情况发生在安装scrapy/twisted等库的时候,看起来时需要一个c++编译器。安装vstudio实在太大了,网上也给出了不少解决方案,但是下面这个是简单的,直接pip安装二进制版
pip install --only-binary :all: greenlet
Complete output from command e:\erp\odoo\odooerp\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ZC\\AppData\\Local\\Temp\\pip-install-vgxn_5e4\\greenlet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ZC\AppData\Local\Temp\pip-record-_wtj3pp7\install-record.txt --single-version-externally-managed --compile --install-headers e:\erp\odoo\odooerp\include\site\python3.6\greenlet:
running install
running build
running build_ext
building 'greenlet' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "e:\erp\odoo\odooerp\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ZC\\AppData\\Local\\Temp\\pip-install-vgxn_5e4\\greenlet\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ZC\AppData\Local\Temp\pip-record-_wtj3pp7\install-record.txt --single-version-externally-managed --compile --install-headers e:\erp\odoo\odooerp\include\site\python3.6\greenlet" failed with error code 1 in C:\Users\ZC\AppData\Local\Temp\pip-install-vgxn_5e4\greenlet\
推荐图片压缩网站http://www.yatu8.com/