0

I've been trying to install Misaka for python 3.7 and also I am using windows 10 pro but there is an error which is weird because I already have c++ 14 installed here is the error after I type:

pip install misaka

In the windows command line:

running install
running bdist_egg
running egg_info
writing misaka.egg-info\PKG-INFO
writing dependency_links to misaka.egg-info\dependency_links.txt
writing requirements to misaka.egg-info\requires.txt
writing top-level names to misaka.egg-info\top_level.txt
reading manifest file 'misaka.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.so' found under directory                 
'misaka'
no previously-included directories found matching 'misaka\__pycache__'
no previously-included directories found matching 'docs\_build'
no previously-included directories found matching 'tests\__pycache__'
writing manifest file 'misaka.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\lib.win32-3.6
creating build\lib.win32-3.6\misaka
copying misaka\api.py -> build\lib.win32-3.6\misaka
copying misaka\callbacks.py -> build\lib.win32-3.6\misaka
copying misaka\constants.py -> build\lib.win32-3.6\misaka
copying misaka\utils.py -> build\lib.win32-3.6\misaka
copying misaka\__init__.py -> build\lib.win32-3.6\misaka
running build_ext
generating cffi module 'build\\temp.win32-3.6\\Release\\misaka._hoedown.c'
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
building 'misaka._hoedown' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual         C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

Also I tried installing misaka from the actual files using the command: python setup.exe install got the same error

I couldn't find anything on the internet that solves my problem.

Raja G
  • 5,973
  • 14
  • 49
  • 82
Alireza
  • 135
  • 1
  • 10

3 Answers3

1

I could solve my problem by installing Anaconda first and then installing the c++ Compiler for python with this command:

conda install libpython m2w64-toolchain -c msys2

I also had to upgrade my pip installer which I was using version 10, and I upgraded pip with this command:

python -m pip install --upgrade pip

and when I attempted to install misaka library:

pip install misaka

i got the message that it was already installed

Alireza
  • 135
  • 1
  • 10
0

I believe you are using 32 bit Python in a 64-bit OS with reference to lib.win32-3.6.

I suggest you uninstall 32-bit Python and install a 64-bit python version and try again.

Raja G
  • 5,973
  • 14
  • 49
  • 82
  • Command "c:\users\alireza\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Alireza\\AppData\\Local\\Temp\\pip-install-7oq_masv\\misaka\\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\Alireza\AppData\Local\Temp\pip-record-ns00x7lh\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Alireza\AppData\Local\Temp\pip-install-7oq_masv\misaka\ – Alireza Dec 28 '18 at 12:34
  • can you give complete end to end stacktrace please, you can use pastebin. – Raja G Dec 28 '18 at 12:35
0

Only working solution I found for windows,

Go to Visual Studio download page as mentioned in the error, download the installer for the latest version, run the installer,

if you already installed visual studio then click modify, make sure to select the required packages, especially 'windows 10 sdk' as in the image [Around 1.2gb download and 4.2gb disk space needed in first install].

Then run pip install misaka, to successfully build the package.

If Anaconda distribution is installed in your system, you can try running

conda install libpython m2w64-toolchain -c msys2

But it won't work for all windows-python version combinations.Any time, building the package requires visual c++.

Akshay Chandran
  • 985
  • 11
  • 16