Closed LucaCras closed 9 months ago
Hello,
Thanks for reporting this issue.
Did you clone it from github ? Or just typed "pip install lightsim2grid" ?
The error you sent does not look like it came from "python3 setup.py build" but rather from "pip install lightsim2grid". It would help if you could send it to me.
Otherwise, you can install the "whl" you find here : https://github.com/BDonnot/lightsim2grid/suites/12553865846/artifacts/670809515 (it will be the same file as the one used when you install lightsim2grid through pip). To install it from there unzip it, and type pip install LightSim2Grid-0.7.2.dev1-cp310-cp310-macosx_11_0_x86_64.whl
(for the version I sent)
I, indeed, tried installing through pip.
I also tried your workaround, but I get the following error (maybe I need a different build wheel, but I don't know where to find them):
ERROR: LightSim2Grid-0.7.2.dev1-cp310-cp310-macosx_11_0_x86_64.whl is not a supported wheel on this platform.
Installation through github cloning worked.
Hello,
Thanks for the answers. Glad to see it worked from source. I'll try to find out why your system does not like the whl provided.
Are you running a 32bits system?
I have tried "pip install lightsim2grid" and I got the same error as the author. I have tried installing the wheel from the link you have shared and I got the same error as the author. I have tried "installation from source" like the author mentioned which includes git clone, git submodule init, git submodule update, pip install -U pybind11, pip install -U . . However, I got the following error for git submodule update: fatal: unable to access 'https://github.com/DrTimothyAldenDavis/SuiteSparse/': Recv failure: Operation timed out fatal: clone of 'https://github.com/DrTimothyAldenDavis/SuiteSparse' into submodule path '/Users
Please help install lightsim2grid so I can install l2rpn_baselines following that.
Hello,
Github might have been experiencing some bugs when you ran the "git submodule init" or "got submodule update" have you tried multiple times? Can you retry now?
Sorry for the issue, when I'll be back from holiday I'll try to find a more permanent solutions for arm build (I suspect your computer has an M1 or M2 chip with is arm64 and not a "regular" x32 or x86_x64 processor).
Yes, I did it another time, and it works. Thank you! My computer has an M2 chip.
Hello @LucaCras @MuhaoGuo
Can you try to download the appropriate wheel that you can find here:
https://github.com/BDonnot/lightsim2grid/actions/runs/5939654212
(if using python 3.10 then download the wheels-darwin-cp310
- cp310 stands for "c python 3.10"-, unzip it and then
use the LightSim2Grid-0.7.3-cp3xx-cp3xx-macosx_11_0_arm64.whl
- important part is arm64 here)
(replace cp310
with eg cp39
if using python 3.9 or cp311
if using python 3.11 etc.)
And then install it on your Mac, eg with (if using python 3.10 on your mac)
pip install LightSim2Grid-0.7.3-cp310-cp310-macosx_11_0_arm64.whl
and let me know if this works for you ? If so i'll add it to pypi for next lightsim2grid version (coming soon)
Thanks a lot :-)
Also, I leave it here if problem like this arises again, Apple provide a way to use a x86 (64 bits) package on their machine with the "Rosetta 2 emulation" as said here https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon (paragraph x86_64
) and with a way to activate it here https://stackoverflow.com/questions/71691598/how-to-run-python-as-x86-with-rosetta2-on-arm-macos-machine:
Conda can create x86 environments on Mac Arm.
Install [miniconda](https://docs.conda.io/en/main/miniconda.html)
Create an environment configured for x86
conda create -n my_x86_env -y
conda activate my_x86_env
conda config --env --set subdir osx-64
Install whichever version of Python you want
conda install python=3.10
Install packages using conda or pip
conda install numpy
pip install networkx
For this environment (my_x86_env), python and pip are x86 versions so they will only grab x86 versions from anaconda, conda-forge, and pypi. Any environments you create without running conda config --env --set subdir osx-64 will be arm64 environments. So you can get the native speed when you want it and the compatibility with x86-only packages when you need it.
(I just copy pasted the best answer there, did not tested it...)
Let me know if latest version (0.7.5) solves this issue, i made some change in the continuous integration in hope it fixes the issue. As I don't own a Mac debugging this is really slow.
In the mean time i'll close this.
Environment
1.8.1
(eg 1.4.0)0.7.1
(eg 0.5.0)osx
Note: If the bug concerns an installation issue, you have to provide us with the output of:
output:
Bug description
Cannot install lightsim2grid on macOS...
How to reproduce