Skip to main content

Issue with installing python-axolotl or python-axolotl-curve25519 on Windows

It is peeve amazing how many hours get burnt while trying to resolve simple package dependency issues. I may be too dumb to proffer a lasting one-fits-all solution to all dependency issues, but I got this issue fixed in my own case.

Problem Description:
The python-axolotl library requires certain dependencies that are not properly managed when installing libraries via a command line's requirement.txt file.

I got real help by reading through this link below, but this page might be more helpful when it comes to detailed instructions.
Actual instructions: https://github.com/tgalal/python-axolotl

Typical errors might look like the following:

1. In this case, missing library(s). Libraries needed for compiling some python resources. Unfortunately, http://aka.ms/vcpython27 has been decommissioned because Python2x is EOL. You can still get the VcPython27 from an archive at https://web.archive.org/web/20210106040222/download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "C:\Users\Administrator\AppData\Local\Continuum\Anaconda2\envs\swdb\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\justink\\appdata\\local\\temp\\pip-yja6cx-build\\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\justink\appdata\local\temp\pip-f0cy1o-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\justink\appdata\local\temp\pip-yja6cx-build\


2. In this case, there is a missing file in the package discussed above (VCForPython27.msi). Copy the file at this URL: https://github.com/mattn/gntp-send/blob/master/include/msinttypes/stdint.h
and paste it in C:\Users\Administrator\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\
curve/curve25519-donna.c(49) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
  error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 

Note: As a requirement, the authors of python-axolotl require that MinGW (plus GCC) and Zlib must be installed. The next instructions will guide you on How to get this done.

3. To download MinGW for windows(MinGW-get-setup.exe), I suggest this link
https://osdn.net/projects/mingw/releases/
This is just an installation manager for MinGW. After installation, the manager will provide different variants and we shall install the necessary variant.

4. Add MinGW to environment variables
e.g Add C:\MinGW\bin to environment variables

5. Create a new file named distutils.cfg, put this new file in the Lib/distutils folder of your python installation e.g C:\python27\Lib\distutils.
inside this file add these 2 lines and save:
[build]
compiler=mingw32

6. Open a new instance of the Command prompt and run this command, Remember what I said about variants? here it is...

mingw-get.exe install gcc
Note: due to some spaces in my Docker path variables, My system was unable to see the MinGW path so, I appended the MinGW to the beginning of the Path string. Another way is to open the CMD and navigate to the bin directory of MinGW.


7. download a version of Zlib, I suggest using this link
http://gnuwin32.sourceforge.net/packages/zlib.htm


Now you can resume any previous installation of python-module or libraries that were failing previously.

Examples of installs affected by these are:

https://github.com/PyWaves/PyWaves/issues/59
https://github.com/romanzaikin/BurpExtension-WhatsApp-Decryption-CheckPoint/issues/1
https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/211

Let me know if there are other things I might have left out, or perhaps one of the links is broken. It will help someone someday. There are quite a few other things I did while trying to resolve this issue, but I count them as insignificant, if your case seems a bit different, let me know, I could be of help.


If there is something not right with this article, please I would like to know. feel free to drop a comment, all kinds of comments are welcomed but the nice ones are well appreciated and no comment will be ignored.

Comments

Popular Articles

Resolving Incompatible Builds of PHP and Apache in Laragon: Add multiple versions of Apache

 As developers, it's often the case that different versions of PHP and server tools are installed quickly without taking into account the architecture for which they were built. In this article, we will focus on solving a specific error that arises when running incompatible builds of PHP and Apache. Recently, I encountered an issue when downgrading my Laragon setup from PHP 8.1 (x64) to PHP 7.x (x86). This caused compatibility problems with Apache, and I received an error message indicating that my PHP and Apache builds were not compatible, as the Apache installed was built for x64 versions of PHP. In this article, I'll provide a step-by-step guide on how to install multiple versions of Apache on Laragon. By following these steps, you can resolve any similar issues that you may encounter. Step 1: Download the Latest Version of Apache Visit https://www.apachelounge.com/download/additional/ to download the latest version of Apache. The homepage provides quick access to 64-bit ve

[SOLVED] Linux - Issues installing Docker on Ubuntu - libseccomp2 version 2.3.1 installed but 2.4 required

This article has been improved for a better understanding - goto  https://splashcoder.blogspot.com/2023/07/installing-docker-on-ubuntu-1804-solved.html There is a possibility that you are trying to install docker. There is a very comprehensive guide at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository. The linked guide serves as a reference for this article. We try to address the common errors in this article. Just so you won’t have to scour the entire answers on StackOverflow. Step 1: The first thing is to run our famous "apt update" command. So run the command below. sudo apt-get update You may observe that there are some errors. And YES! we are using a fairly old Ubuntu 18.04 Bionic Beaver Release. It seems perfect for this as most people have issues installing docker anyways. To resolve this, you may refer to  Configure DNS server IP to resolve errors with apt-get update Step 2: Following the Docker article, we should run the commands below. sudo

Laragon: installing more versions of Apache/HTTPD

Most of the time, we casually install various PHP versions and server tools without checking if they were built for Win32 or Win64. A discussion for another day. I recently downgraded Laragon’s from PHP8.1-x64 to PHP7.x-x86. This had a little consequence - APACHE! Hence, I got the error below, indicating that my PHP and Apache can’t work together because they are of different architectures or builds.   The originally installed Apache was for 64-bit PHP versions, there are no Apache versions designed to run both 32-bit and 64-bit builds of PHP. In this article, I share steps and links that guide you to install multiple versions and builds of Apache on Laragon. 1. For all intent and purposes, you are advised to always download the latest version of Apache. Visit this URL https://www.apachelounge.com/download/additional/ to see the different versions available. It is easy to access the 64-bit versions from the homepage. However, to access the 32-bit versions, you need to use this URL. 2