riyadude
riyadude

Reputation: 347

Failure to build wheel / "Error: INCLUDE Environment Variable is empty"

I am using Python 2.7.11 and am trying to pip install modules however a few of them are failing. The message I get is "Failure to build wheel for 'X'" and "Error: INCLUDE Environment Variable is empty".

I tried to install Scrapy, LXML and Twisted and those failed. Some other random modules I tried installed fine.

I have installed pyOpenSSL, added python27 and python27/scripts to environment.

Thanks,

Upvotes: 6

Views: 8721

Answers (3)

ranni rabadi
ranni rabadi

Reputation: 324

I tried both the solutions offered, none worked.

I installed Microsoft Visual C++ Compiler for Python 2.7, download it here. Then run:

pip install scrapy

That worked for me

Upvotes: 2

Saurabh Yadav
Saurabh Yadav

Reputation: 365

Use a pre built library from this link if you are on windows: https://www.lfd.uci.edu/~gohlke/pythonlibs/

Choose the relevant library given python version and desktop config. For example I want to install apell in python 3.6 and winamd64 then download this:

aspell_python-1.15-cp36-cp36m-win_amd64.whl

Now go to your console and type

pip install path-to-.whl

and that's it.

Upvotes: 0

Sean Miller
Sean Miller

Reputation: 1

A quick solution is to install the pre-compiled version of lxml. You can find it here. If you use the .exe you can point it directly to your python root folder.

After that:

  1. close and re-open cmd
  2. pip install your_package (make sure cmd is in the correct directory)
  3. enjoy having no frustrating lxml errors!

Hope this helped.

Upvotes: 0

Related Questions