cslarsen/arv

issue installing on Windows 10 Python 3.5

momonala opened this issue · 13 comments

Hi, I'm getting a RuntimeError: Error configuring Google hash map while trying to install on Windows 10, python 3.5. My g++ version is 7.2.0. Additionally, I get the two following messages in the trace-back:

'3rd-party\sparsehash\configure' is not recognized as an internal or external commandget

Command "C:\Users\mohit\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\mohit\\AppData\\Local\\Temp\\pip-build-moqo7k4i\\arv\\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\mohit\AppData\Local\Temp\pip-wgyn71nf-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\mohit\AppData\Local\Temp\pip-build-moqo7k4i\arv\

I don't have Windows to test this on, so I'm not sure I can help. Are you running under cygwin? If so, I believe it should work. Perhaps you can try to run the configure script manually?

I see. Unfortunately I don't have much time anymore to play with this. If I try again with any success I will keep you posted. Thanks!

I'm also encountering this error on Windows 7 64bit with python 2.7.11 and trying to install via 'pip install arv'

 Configuring Google hash map
'3rd-party\sparsehash\configure' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\stanto\appdata\local\temp\pip-install-1qfezf\arv\setup.py", line 165, in <module>
    "Programming Language :: Python :: 3.6",
  File "c:\python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "c:\python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\python27\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "c:\python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "c:\python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "c:\python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "c:\users\stanto\appdata\local\temp\pip-install-1qfezf\arv\setup.py", line 86, in run
    configure_google_hashmap()
  File "c:\users\stanto\appdata\local\temp\pip-install-1qfezf\arv\setup.py", line 82, in configure_google_hashmap
    raise RuntimeError("Error configuring Google hash map")
RuntimeError: Error configuring Google hash map

@syberphunk This is the exact same problem as above. Arv is made for UNIX-like systems, so you need to run this under Cygwin or that "bash" thing for Windows or what it's called, IF it lets you compile things (does gcc work there?). If not, you have to try this in Cygwin. OR, there is a possibility that Google hashmap actually comes with a configure .bat-script or something. I need help on this, I don't have Windows.

@cslarsen Can we not bundle a pre-compiled windows binary instead of having to compile it on the fly? A C compiler can run under 'command prompt' in windows, it doesn't have to be cygwin. Although I could install cygwin, I'd rather not, just to use a python library.

@syberphunk That's an option, but I still don't have Windows to produce a binary with. I've added the label "help wanted", so if someone can indeed help, but I'd prefer not to ship binaries that aren't under my control.

@cslarsen So, how can I help best?

@syberphunk Do you have a Windows compiler like Visual Studio? The setup.py file is able to invoke the compilers (I think you have to be using a command prompt that sets the correct environment variables; VS has a menu item for opening up such a prompt). Then go to Google Hashmap official repo and figure out how to run the equivalent of configure but for Windows. Perhaps they have a bat file or something. I really think it should be quite easy, at least in theory.

Compiling google's hashmap on windows is not so straight forward it appears. Because Microsoft Windows doesn't come with its libraries by default, in a link-able manner, as other operating systems typically do, it appears we require the Windows SDK and Visual Studio (VS) to be installed. At the time of writing Google Hashmap uses SDK 8.1, and we can build with the Community version of Visual Studio - however it wasn't built against version 2017, which means either an older version of VS needs to be used or the project solution 'upgraded' which can introduce complications (apparently with manifests and the build order).

This's no small amount of files to download and setup to get working to build this, and if we want to be able to pass a command line parameter then we'd be looking at using MSBuild to do it.

Windows 8.1 SDK is now out of date with Windows 10 SDK being at thing, but it's still downloadable.

Any updates on this issue? Currently running into the same problem trying to install on Windows 10, Python 3.6:

Installing collected packages: arv
  Running setup.py install for arv ... error
    Complete output from command "D:\Desktop\Senior Project\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\jumpr\\AppData\\Local\\Temp\\pip-install-41z69d42\\arv\\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\jumpr\AppData\Local\Temp\pip-record-72zawrax\install-rec
ord.txt --single-version-externally-managed --compile --install-headers "D:\Desktop\Senior Project\venv\include\site\python3.6\arv":
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.6
    creating build\lib.win32-3.6\arv
    copying arv\match.py -> build\lib.win32-3.6\arv
    copying arv\traits.py -> build\lib.win32-3.6\arv
    copying arv\util.py -> build\lib.win32-3.6\arv
    copying arv\__init__.py -> build\lib.win32-3.6\arv
    copying arv\__main__.py -> build\lib.win32-3.6\arv
    running build_ext
    Configuring Google hash map
    '3rd-party\sparsehash\configure' is not recognized as an internal or external command,
    operable program or batch file.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jumpr\AppData\Local\Temp\pip-install-41z69d42\arv\setup.py", line 165, in <module>
        "Programming Language :: Python :: 3.6",
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "D:\Desktop\Senior Project\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\jumpr\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\jumpr\AppData\Local\Temp\pip-install-41z69d42\arv\setup.py", line 86, in run
        configure_google_hashmap()
      File "C:\Users\jumpr\AppData\Local\Temp\pip-install-41z69d42\arv\setup.py", line 82, in configure_google_hashmap
        raise RuntimeError("Error configuring Google hash map")
    RuntimeError: Error configuring Google hash map

    ----------------------------------------

No. I recommend using a UNIX system to run Arv on (perhaps the Linux subsystem for Windows will work?). Arv doesn't officially support Windows, and personally I have no plans to support it either.

I am running this using WSL and it is working fine. Here is a link to setup wsl. It is really easy and works great. After you get WSL (+ ubuntu from app store [free]) running make sure to run apt-get update and install pip. Then follow the install directions.

Works under WSL, will close this one.