2

I need to install misaka, but when I use pip install misaka I get an error that reads:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\JHONAT~1\AppData\Local\Temp\pip-build-utm0mant\misaka\

I don't really know what to do to solve it. I've tried using pip3 instead, no change and using pip2 also. I'm currently using python 3.6.4 and Django 1.11.

     Collecting misaka
  Using cached https://files.pythonhosted.org/packages/47/c2/ba9c82ae0ec62bcec62d690e715be6ead4457f83000f4ef6e919f77a8e5f/misaka-2.1.0.tar.gz
Collecting cffi>=1.0.0 (from misaka)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/2f/85/a9184548ad4261916d08a50d9e272bf6f93c54f3735878fbfc9335efd94b/cffi-1.11.5-cp36-cp36m-win_amd64.whl (166kB)
    100% |████████████████████████████████| 174kB 17kB/s
Collecting pycparser (from cffi>=1.0.0->misaka)
Building wheels for collected packages: misaka
  Running setup.py bdist_wheel for misaka ... error
  Complete output from command g:\programming\anaconda3\envs\virtual\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\JHONAT~1\\AppData\\Local\\Temp\\pip-b
uild-9fgtbhdd\\misaka\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\U
sers\JHONAT~1\AppData\Local\Temp\tmptz2d209jpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\misaka
  copying misaka\api.py -> build\lib.win-amd64-3.6\misaka
  copying misaka\callbacks.py -> build\lib.win-amd64-3.6\misaka
  copying misaka\constants.py -> build\lib.win-amd64-3.6\misaka
  copying misaka\utils.py -> build\lib.win-amd64-3.6\misaka
  copying misaka\__init__.py -> build\lib.win-amd64-3.6\misaka
  running build_ext
  generating cffi module 'build\\temp.win-amd64-3.6\\Release\\misaka._hoedown.c'
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-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

  ----------------------------------------
  Failed building wheel for misaka
  Running setup.py clean for misaka
Failed to build misaka
Installing collected packages: pycparser, cffi, misaka
  Running setup.py install for misaka ... error
    Complete output from command g:\programming\anaconda3\envs\virtual\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\JHONAT~1\\AppData\\Local\\Temp\\pip
-build-9fgtbhdd\\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\JHONAT~1\AppData\Local\Temp\pip-crdk5uw4-record\install-record.txt --single-version-externally-managed --compile --install-headers g:\programming\anaconda3\envs\virtual\inc
lude\site\python3.6\misaka:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\misaka
    copying misaka\api.py -> build\lib.win-amd64-3.6\misaka
    copying misaka\callbacks.py -> build\lib.win-amd64-3.6\misaka
    copying misaka\constants.py -> build\lib.win-amd64-3.6\misaka
    copying misaka\utils.py -> build\lib.win-amd64-3.6\misaka
    copying misaka\__init__.py -> build\lib.win-amd64-3.6\misaka
    running build_ext
    generating cffi module 'build\\temp.win-amd64-3.6\\Release\\misaka._hoedown.c'
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-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

    ----------------------------------------
Command "g:\programming\anaconda3\envs\virtual\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\JHONAT~1\\AppData\\Local\\Temp\\pip-build-9fgtbhdd\\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\JHONAT~1\AppDat
a\Local\Temp\pip-crdk5uw4-record\install-record.txt --single-version-externally-managed --compile --install-headers g:\programming\anaconda3\envs\virtual\include\site\python3.6\misa
ka" failed with error code 1 in C:\Users\JHONAT~1\AppData\Local\Temp\pip-build-9fgtbhdd\misaka\

My internet connection is not the fastest, right now im downloading VS2015 to see if it solves my problem, because the link provided by the log doesnt work anymore. thanks for the replies, i'll update when the download finishes

5 Answers5

1

From package documentation

If you’re installing from source and are using Debian or a Debian derivative (e.g. Ubuntu) make sure build-essential, python-dev and libffi-dev are installed.

sudo apt-get install python-setuptools python-dev build-essential

EDIT


Windows:

Your error clearly states you need to install Microsoft Visual C++ 14.0

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://go.microsoft.com/fwlink/?LinkId=691126

Gesy Darati
  • 113
  • 1
  • 6
iklinac
  • 14,944
  • 4
  • 28
  • 30
1

am take this way 1- install conda with prombt of conda install : conda install libpython m2w64-toolchain -c msys2

2-upgrade your pip by : python -m pip install --upgrade pip

3-instal misaka : pip install misaka

0

Working solution!

Go to https://visualstudio.microsoft.com/downloads/ scroll down one page and download Visual Studio 2017 community.

Go through following link to download the required components for Microsoft Visual C++ 14.0, the link provides what components to be selected while downloading.

https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html

Hope it works as it worked for me!

KTDLIN
  • 21
  • 3
0

Do this:

  1. git clone https://github.com/FSX/misaka.git

2.cd misaka

3.python setup.py install

Piyush Kumar
  • 61
  • 1
  • 4
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

like as suggested in other answers, but it won't work for all windows-python version combinations.Any time, building the package requires visual c++.

Akshay Chandran
  • 985
  • 11
  • 16