简体   繁体   中英

Cabal installation error missingpy on Haskell Platform 2010.2.0.0 on Windows 7

I am a newbie Haskell-user and want to use Python libraries (for interaction with existing software for example using Numpy libraries). I found out that this can be done using the MissingPy package ( http://hackage.haskell.org/package/MissingPy ), however I am not able to install it via cabal on Windows 7 on the Haskell platform 2010.2.0.0.

The first error I had, was because the compiler didn't find the python2.6-libraries. This was solved by putting python2.6.dll in the correct directory (or adding it to the system path variable). However, I am unable to fix the following error at the end of the output of the "cabal install missingpy"-command:

...
[11 of 12] Compiling MissingPy.FileArchive.GZip ( MissingPy\FileArchive\GZip.hs, dist\build\MissingPy\FileArchive\GZip.p_o )
[12 of 12] Compiling MissingPy.FileArchive.BZip2 ( MissingPy\FileArchive\BZip2.hs, dist\build\MissingPy\FileArchive\BZip2.p_o )
Registering MissingPy-0.10.5...
setup.exe: MissingPy-0.10.5: library-dirs: None doesn't exist or isn't a
directory (use --force to override)
cabal: Error: some packages failed to install:
MissingPy-0.10.5 failed during the building phase. The exception was:
ExitFailure 1

I installed the full MinGW-software after reading the suggestions on the answers on the question asked on Using c2hs on Windows . However, this did not solve the issue.

Anyone having experience and solutions on this issue?

Note that the Setup.exe populates the build info using a python tool:

https://github.com/softmechanics/missingpy/blob/master/Setup.hs

The relevant code is here:

  libDir       <- python ["-c", "from distutils.sysconfig import *; print get_python_lib()"]
  incDir       <- python ["-c", "from distutils.sysconfig import *; print get_python_inc()"]
  confLibDir   <- python ["-c", "from distutils.sysconfig import *; print get_config_var('LIBDIR')"]
  pyVersionStr <- python ["-c", "import sys; sys.stdout.write(\"%d.%d\" % (sys.version_info[0], sys.version_info[1]))"]

If the python tool doesn't exist, can' be found, or gives bad information, the setup will fail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM