0

This is a long question so please be with me as I attempt to provide all the details. I have to install a Python module that requires twisted to be built. After spending several weeks and resolving multiple issues (which I'm describing later for the context), I'm stuck with one problem which am not able to resolve. When I'm trying to build one particular file raiser.c, it says that there has been no output file specified. However, /OUT flag is clearly seen in the output from pip install as noted below.

    raiser.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\paul\appdata\local\programs\python\python36\libs /LIBPATH:c:\users\paul\appdata\local\programs\python\python36\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\" /EXPORT:PyInit_raiser build\temp.win-amd64-3.6\Release\src/twisted/test/raiser.obj /OUT:build\lib.win-amd64-3.6\twisted\test\raiser.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src/twisted/test\raiser.cp36-win_amd64.lib LINK : warning LNK4001: no object files specified; libraries used    LINK : warning LNK4068: /MACHINE not specified; defaulting to X86    LINK : fatal error LNK1159: no output file specified    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\link.exe' failed with exit status 1159

As you can see, the output I think is clearly specified in the make command

/OUT:build\lib.win-amd64-3.6\twisted\test\raiser.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src/twisted/test\raiser.cp36-win_amd64.lib

So why is it still complaining? My configuration is the following: Windows 7 64 bit machine, Python 3.6.0 also 64 bit installed, installed visual studio 2015 after getting errors. No previous version installed earlier.

This is what I have resolved so far in my journey to build twisted

  1. Initially it said that Microsoft Visual C++ 14.0 build tools is not installed.
  2. I installed it but it did not make any difference
  3. And then I installed visual studio 2017 but it did not make any difference.
  4. I then uninstalled everything and installed visual studio 2015 which I got from a DVD because Microsoft is no longer providing it.
  5. It still gave me problems and then I had to install Windows SDK 10.0 which surprisingly took more than six hours to install.
  6. Then it started giving me errors like io.h file is not present after searching a while, it seemed that setting the environment variable INCLUDE to the part of various federal files which it was not able to find would help. I then recompile several times and every time it would complain for a particular header file, I would find its path and change the environment variable to point to it
  7. Then it started complaining that it does not have the proper library MSVCRT.lib. I found the path and then provided it in another environment variable LIB
  8. Finally now it is building but at the and it says no output file has been specified.

Additional question: I'm running 64 bit Windows 7. However, visual studio 2015 still got installed to program files (X 86) directory which I believe is for 32 bit programs. I then checked with another person who has similar configuration except he's having Windows 10 but for him also visual studio 2015 is installed in the program files (X 86) directory. Is it possible that all of these problems are because visual studio 2015 is not being installed in the 64 bit program files directory?

Thank you for reading up till this point :-) I have been working on this for several weeks

There are several questions on building twisted on python and most of them which have been imposed in 2017 seem to be unresolved. Is it possible that later version of Python are not working properly.

For example,this and this

Ramana
  • 243
  • 4
  • 15
  • 1
    Try https://www.microsoft.com/en-us/download/details.aspx?id=44266 – Jean-Paul Calderone Jul 16 '18 at 15:47
  • thank you for the comment. However this is only for Python 2.7 and are using Python 3.6.0. I'm going to try it nevertheless. And hope that it will produce a wheel that I can install then. – Ramana Jul 16 '18 at 17:38

3 Answers3

0

I also faced this issue.

Python3.6 unable to find Microsoft Visual C++ 14.0, because microsoft changed dll file name from "msvcr" to "vcruntime"

Check below issue.

https://bugs.python.org/issue32535

But you can installed Twisted using Wheel file, google it.

Download wheel file of twisted and install it using pip.

  • Thank you. The problem is installation of the wheel file is that it may sometimes mysteriously not work because it may not be actually built for my system. Considering that twisted can lead to subtle errors I was hoping I will do it on my own. I wanted to vote up for your answer but I don't have enough points right now to do so – Ramana Aug 02 '18 at 10:37
0

pip install scrapy

if error 1 message

Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/

Download suitable visual C++14

Download suitable Twisted version

Go to C/../downloads:

pip install Twisted‑18.7.0‑cp37‑cp37m‑win32.whl

Return to project folder and pip install scrapy to check all is successfully installed

soelyla
  • 1
  • 1
0

This is very simple on windows. You need to install Twisted seperately.

Just 2 steps:

  1. pip install pipwin
  2. pipwin install Twisted
Nishith Savla
  • 310
  • 2
  • 10