OSeMOSYS / otoole

OSeMOSYS Tools for Energy
https://otoole.readthedocs.io
MIT License
23 stars 17 forks source link

Otoole installation error #229

Closed vignesh1987 closed 1 month ago

vignesh1987 commented 1 month ago

The Issue

When I try to install Otoole on my Windows 11 PC, I get the following error message. It is not a related error, but I would like to get advice on how to proceed.

UPDATING build\lib.win-amd64-cpython-312\pandas/_version.py
      set build\lib.win-amd64-cpython-312\pandas/_version.py to '2.0.3'
      running build_ext
      building 'pandas._libs.algos' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects

And this error exists even after installing Microsoft Visual C++ and the respective build tools

Expected Behavior

Clean install of otoole.

Steps To Reproduce

No response

Log output

No response

Operating System

Windows

What version of otoole are you running?

1.1.2

Possible Solution

No response

Anything else?

No response

trevorb1 commented 1 month ago

Thanks for reporting, @vignesh1987!

Unfortunately, I dont have a Windows machine set up to replicate your error (but can get one if we cant solve this quickly!). A few notes:

Thanks again in advance, and please let me know if you run into any issues with the options outlined above! :)

vignesh1987 commented 1 month ago

Hi Trevor,

Thanks for the pointers

Fixed the issue.

  1. My Visual C++ had some issues. so I had to reset my login (for the Windows user profile), and then otoole could install it properly.
  2. For people with this issue with Visual C++ in Windows machines who cannot reset their profile, the workaround is to use an older version of Python. I tried using Python ==3.11.7 in a separate conda environment, and it worked properly.

I realise this issue might be particular, and only a few might face this.