FSX / misaka

A Python binding for Hoedown.
http://misaka.61924.nl
MIT License
418 stars 65 forks source link

pip install misaka==2.0.0 error and pip install misaka==1.0.2 error #49

Closed harish211 closed 5 years ago

harish211 commented 9 years ago

Do I need to have any other packages/programs pre-installed to get this working? I keep getting the error even if I use the downgraded version of misaka, which is not the case for most, AFAIK. Any help in this regard is highly appreciated. Thank you!

    (iss) C:\Users\Home\lib\iss\project>pip2.7 install misaka==1.0.2
    Collecting misaka==1.0.2
      Using cached misaka-1.0.2.tar.gz
    Building wheels for collected packages: misaka
      Running setup.py bdist_wheel for misaka
      Complete output from command C:\Users\Home\lib\iss\Scripts\python.exe -c "import setuptools;__file__='c:\\users\\home\\appdata\\local\\temp\\pip-build-t4utkq\\misaka\\setup.py';ex
ec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\home\appdata\local\temp\tmpb6pzhapip-wheel-:
      running bdist_wheel
      running build
      running build_ext
      building 'misaka' extension
      creating build
      creating build\temp.win32-2.7
      creating build\temp.win32-2.7\Release
      creating build\temp.win32-2.7\Release\src
      creating build\temp.win32-2.7\Release\src\sundown
      C:\Users\Home\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Users\Home\lib\iss\PC
 /Tcsrc/misaka.c /Fobuild\temp.win32-2.7\Release\src/misaka.obj
  misaka.c
  src/misaka.c(235) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
  error: command 'C:\\Users\\Home\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

      ----------------------------------------
      Failed building wheel for misaka
    Failed to build misaka
    Installing collected packages: misaka
      Running setup.py install for misaka
        Complete output from command C:\Users\Home\lib\iss\Scripts\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\home\\appdata\\local\\temp\\pip-build-t4utkq\\misaka\\
setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\home\appdata\local\temp\pip-9wmxbi-recor
d\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Home\lib\iss\include\site\python2.7\misaka:
        running install
        running build
        running build_ext
        building 'misaka' extension
        C:\Users\Home\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Users\Home\lib\iss\
PC /Tcsrc/misaka.c /Fobuild\temp.win32-2.7\Release\src/misaka.obj
    misaka.c
    src/misaka.c(235) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
    error: command 'C:\\Users\\Home\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "C:\Users\Home\lib\iss\Scripts\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\home\\appdata\\local\\temp\\pip-build-t4utkq\\misaka\\setup.py';exec(compile(g
etattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\home\appdata\local\temp\pip-9wmxbi-record\install-record.txt --s
ingle-version-externally-managed --compile --install-headers C:\Users\Home\lib\iss\include\site\python2.7\misaka" failed with error code 1 in c:\users\home\appdata\local\temp\pip-bu
ild-t4utkq\misaka
FSX commented 9 years ago

Windows is missing a header file, stdint.h. I'll look into this issue tomorrow.

sprin commented 9 years ago

I've seen this issue before, let me copy the relevant part from an isso issue:

The compiler cannot find the so-called "C (C99) headers", which don't appear to be bundled with your version of VC++. This affects the compilation of any software which needs the C99 headers, including Python libraries which have C99 extensions such as Misaka.

You can still download free, open-source versions of the headers. Here are some relevant links: https://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio http://deeplearning.net/software/theano/install_windows.html#visual-studio-and-cuda

The last link says:

Finally download the stdint.h header from here and save it as C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h.

FSX commented 9 years ago

That's it. Having binary packages for Windows would solve this too. I don't have access to a Windows installation. I can ask a friend to compile a package.

luckerxia commented 8 years ago

Thanks, Sprin I solved the problem. 1, Download Visual C++ for Python from https://www.microsoft.com/download/details.aspx?id=44266 2, My installation path is 'C:\Users\lucker\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0' 3, Copy stdint.h to installation path.

sjjpo2002 commented 8 years ago

step 3 above should be revised to:

Copy stdint.h to installation path\VC\include

ColdHeat commented 7 years ago

Is it possible to upload binary packages?

jorgesumle commented 7 years ago

If you are using a Debian-based GNU/Linux distribution you need to install the libffi-dev package.

Sahil624 commented 7 years ago

I got Same error It says build/temp.linux-x86_64-3.5/misaka._hoedown.c:12:24: fatal error: pyconfig.h: No such file or directory

can anyone help, please?


I found the solution, just install python3-dev for python3.

mshava commented 7 years ago

Pip install misaka gives me an error = Failed building wheel for misaka, error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools