1

I'm trying to get the HDBSCAN package to run on a Windows 7 machine with no C++ compiler. Installing a compiler is not an option, unfortunately. I read that some packages have precompiled wheel files that require no compiler to install. The installation notes state "Binary wheels for a number of platforms are available thanks to the work of Ryan Helinski". However, there is no mention of where those can be found. My questions are then:

  1. How do I obtain the .whl file for the HDBSCAN package?
  2. Is it possible to simply compile+install on another machine and copy it? If so, what should the machine on which I compile have in common with the one on which the code must run? Can I do it on a Windows 10 machine, or does it have to be Win7 as well, do the same Windows updates need to have been run on both, etc?
2
  • lfd.uci.edu/~gohlke/pythonlibs/#hdbscan Commented Jan 6, 2020 at 18:29
  • Explain in your question why "installing a compiler is not an option". If you are forbidden to do that, you are probably also forbidden to install HDBSCAN. Speak and get permission from your manager. If you have the legal rights to change your operating system, consider installing some Linux distribution. Many of them provide GCC Commented Jan 8, 2020 at 12:38

4 Answers 4

3

Looks like there is no pre-built wheel distribution published by the maintainers of the project themselves on PyPI.

As already mentioned by other contributors, one could get such wheel distributions from a third party such as Christoph Gohlke's "Unofficial Windows Binaries for Python Extension Packages".

It is also of course possible to build such wheels yourself on one machine and then reuse it on another. As far as I know in the case of Windows, both machines need to have the same Python interpreter (minor) version as well as the same bitness (both 32 bits or both 64 bits). The exact version of the operating system should not matter (from Windows 10 to Windows 7 or the other way around should work).

Sign up to request clarification or add additional context in comments.

Comments

2

I ended up getting this to work by compiling on another machine and copying the package from it. It was critical that the required packages were of the same version on both machines, so I simply set up a new conda environment which had the same package versions as the target machine, then intalled hdbscan with pip there, and copied. I was worried about Windows version compatibility, but this worked even though I installed on Windows 10 and moved to a machine running Win7.

Comments

0

here is the site you can download the wheel file :https://www.lfd.uci.edu/~gohlke/pythonlibs/ for python 3.5> or PyPi for older versions

  • run python -m pip install thefiledownloadedforyourpythonversion.whl

For the second question , yes you can but is rather complicated and you should avoid it when you can :)

3 Comments

You are seriously recommending downloading and running arbitrary binaries from random web sites???
@JesperJuhl It's not a random website, in Python world it's a well-known web-site. No more random than PyPI.
@Jesper @phd Not "random", but I believe it's important to always mention that these wheel are not built by the actual maintainers of the projects but by a third-party. Christoph Gohlke seems to be doing a very serious job, and makes this entirely clear at the top of its page. (But this message could get overlooked when the link points to the location of the particular project on the page or when people are directed to use pip install pipwin && pipwin install ... without explanation).
-2

I just checked. Python 3.8 is coded in C. You need a C compiler, not a C++ one. MINGW is one, and TinyCC Win32 is another one (a small one, producing quickly slow executables). Look also into this list of free C or C++ compilers.

A possibility (which could take several days of work) might be to use some WSL or some Linux emulator such as JSLinux (it runs in a web browser). Then you could (painfully) build a cross compiler (starting first with a tinycc-win32, then compiling an old cross GCC 3 compiler, then compiling with that a newer C++ GCC, etc....)

But the reality is that you should not be allowed to do this. Your real issue is non technical: why are you not allowed to install then use a C++ compiler, such as MinGW? Get permission (and resources) to install some....

Alternatively, consider installing some Linux distribution (ensure you are allowed to do so). Most of them have a recent Python and GCC...

Is it possible to simply compile+install on another machine and copy it?

This is called cross-compilation and is possible in general. The point is to be permitted to do that. You should find relevant cross-compilers for your situation.

If you are allowed to, you could even use a live Linux USB stick....

Some C compilers written in Python do exist.... You could use them to cross-compile tinycc for Win32. Then you should have a C compiler for Win32. You could then compile an old GCC, etc.... Qemu exist for windows. You could run a Linux with a cross-GCC compiler in Qemu.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.