aiplan4eu / unified-planning

The AIPlan4EU Unified Planning Library
Apache License 2.0
189 stars 40 forks source link

Win 10 installation error #633

Open davemdutton opened 6 days ago

davemdutton commented 6 days ago

As requested Im reporting an installation issue on Windows 10, Python 3.12.3, running Spyder (v6) IDE. Normally Id use conda to manage installs except where pip is the only option.

The pip command and output are copied below. Please note I have no issues installing to the same virtual env with either pip or conda, both before and after this error.

The final error claims that wrapt cannot be found, but it is definitely installed and up-to-date.

pip install unified-planning[engines]

Collecting unified-planning[engines]
  Using cached unified_planning-1.1.0-py3-none-any.whl.metadata (2.8 kB)
Requirement already satisfied: pyparsing in d:\programdata\anaconda\envs\llmdev2\lib\site-packages (from unified-planning[engines]) (3.1.4)
Requirement already satisfied: networkx in d:\programdata\anaconda\envs\llmdev2\lib\site-packages (from unified-planning[engines]) (3.3)
Collecting ConfigSpace (from unified-planning[engines])
  Using cached configspace-1.2.0.tar.gz (130 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Fatal Python error: init_import_site: Failed to import the site module
      Python runtime state: initialized
      Traceback (most recent call last):
        File "<frozen site>", line 624, in <module>
        File "<frozen site>", line 617, in main
        File "D:\ProgramData\Anaconda\envs\llmdev2\Lib\site-packages\certifi_win32\bootstrap.py", line 37, in _execsitecustomize
          _register_bootstrap_functions()
        File "D:\ProgramData\Anaconda\envs\llmdev2\Lib\site-packages\certifi_win32\bootstrap.py", line 25, in _register_bootstrap_functions
          from . import wrapt_certifi
        File "D:\ProgramData\Anaconda\envs\llmdev2\Lib\site-packages\certifi_win32\wrapt_certifi.py", line 3, in <module>
          import wrapt
      ModuleNotFoundError: No module named 'wrapt'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
mikand commented 6 days ago

It looks like an error causied by the installation of ConfigSpace.

Can you try to issue the command pip install configspace to see if the same error is triggered?

davemdutton commented 6 days ago

Exact same error Im afraid

mikand commented 6 days ago

This is weird, because our CI installs everython on Windows without issue (just checked). Can you perhaps try to uninstall wrapt from anaconda and re-install it using PIP (as suggested here: https://stackoverflow.com/questions/74646961/installing-module-wrapt-says-modulenotfounderror-no-module-named-wrapt)?

davemdutton commented 4 days ago

I tried that and it didnt help. First of all I tried removing with conda but that just hung (retried as admin, same result) Then I forced the uninstall with pip (having tried reinstalling and/or ignoring current), then trying to install with pip only for the same error to occur 'wrapt module not found'! Im not sure where to go from here...?