BhallaLab / moose-core

C++ basecode and python scripting interface
https://moose.ncbs.res.in
GNU General Public License v3.0
15 stars 26 forks source link

Building issues #479

Closed analkumar2 closed 1 week ago

analkumar2 commented 3 months ago

A build on a fresh Ubuntu 22.04.4 with Python 3.10.12 required some extra steps that could be included in the setup.py or the cmake files.

  1. install cmake, libgsl0-dev, build-essential, pybind11, dev version of python (python3.10-dev)
  2. set the env variable pybind11_DIR. I used export pybind11_DIR=$(python3 -c "import pybind11; print(pybind11.get_cmake_dir())")
subhacom commented 3 months ago

This is a build issue, not an installation issue.

analkumar2 commented 3 months ago

This is a build issue, not an installation issue.

Have edited the title to reflect this. Thanks

subhacom commented 3 weeks ago

@analkumar2 can you try the windows_build (https://github.com/subhacom/moose-core/tree/windows_build) branch please. We are considering switching to this for better build-automation.

analkumar2 commented 3 weeks ago

Trying to install it again on a fresh system. Will update once done

On Fri, 23 Aug, 2024, 10:46 am subhacom, @.***> wrote:

@analkumar2 https://github.com/analkumar2 can you try the windows_build (https://github.com/subhacom/moose-core/tree/windows_build) branch please. We are considering switching to this for better build-automation.

— Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose-core/issues/479#issuecomment-2306308395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZZVNPVSZSBQ6VOCNKLTOLZS3ARFAVCNFSM6AAAAABIXIGRQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWGMYDQMZZGU . You are receiving this because you were mentioned.Message ID: @.***>

analkumar2 commented 3 weeks ago

Dear Subhasis, Currently, the error I get while importing moose in python3.10 on native windows is - ModuleNotFoundError: No module named 'moose._moose' I'll figure out what I am doing wrong tomorrow. Thank you,

On Fri, Aug 23, 2024 at 6:34 PM Anal Kumar @.***> wrote:

Trying to install it again on a fresh system. Will update once done

On Fri, 23 Aug, 2024, 10:46 am subhacom, @.***> wrote:

@analkumar2 https://github.com/analkumar2 can you try the windows_build (https://github.com/subhacom/moose-core/tree/windows_build) branch please. We are considering switching to this for better build-automation.

— Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose-core/issues/479#issuecomment-2306308395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZZVNPVSZSBQ6VOCNKLTOLZS3ARFAVCNFSM6AAAAABIXIGRQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWGMYDQMZZGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

analkumar2 commented 2 weeks ago

Dear Subhasis, The current version is not installing. When I try using python3 -m pip install . it throws the following error:


LINK : fatal error LNK1104: cannot open file 'python312.lib'

  ninja: build stopped: subcommand failed.
  INFO: autodetecting backend as ninja
  INFO: calculating backend command to run:

C:\Users\analk\micromamba\envs\moose\Library\bin\ninja.EXE -j4 [end of output]

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


When I try the meson method and add _build_install to PYTHONPATH, it fails at the importing stage with the error message: Traceback (most recent call last): File "", line 1, in File "C:\Users\analk\moose-core_build_install\Lib\site-packages\moose__init__.py", line 21, in import moose._moose as _moose ModuleNotFoundError: No module named 'moose._moose'

Thank you,

On Fri, Aug 23, 2024 at 11:24 PM Anal Kumar @.***> wrote:

Dear Subhasis, Currently, the error I get while importing moose in python3.10 on native windows is - ModuleNotFoundError: No module named 'moose._moose' I'll figure out what I am doing wrong tomorrow. Thank you,

On Fri, Aug 23, 2024 at 6:34 PM Anal Kumar @.***> wrote:

Trying to install it again on a fresh system. Will update once done

On Fri, 23 Aug, 2024, 10:46 am subhacom, @.***> wrote:

@analkumar2 https://github.com/analkumar2 can you try the windows_build (https://github.com/subhacom/moose-core/tree/windows_build) branch please. We are considering switching to this for better build-automation.

— Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose-core/issues/479#issuecomment-2306308395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZZVNPVSZSBQ6VOCNKLTOLZS3ARFAVCNFSM6AAAAABIXIGRQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWGMYDQMZZGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

analkumar2 commented 2 weeks ago

Dear Subhasis, The current version is working perfectly. I had multiple versions of python installed and I made the mistake of installing it in one version and importing moose in another. I checked a few rdesigneur tutorials and they were working as expected. I used python -m pip install . to install moose. Thank you,

On Mon, Aug 26, 2024 at 3:45 PM Anal Kumar @.***> wrote:

Dear Subhasis, The current version is not installing. When I try using python3 -m pip install . it throws the following error:


LINK : fatal error LNK1104: cannot open file 'python312.lib'

  ninja: build stopped: subcommand failed.
  INFO: autodetecting backend as ninja
  INFO: calculating backend command to run:

C:\Users\analk\micromamba\envs\moose\Library\bin\ninja.EXE -j4 [end of output]

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


When I try the meson method and add _build_install to PYTHONPATH, it fails at the importing stage with the error message: Traceback (most recent call last): File "", line 1, in File "C:\Users\analk\moose-core_build_install\Lib\site-packages\moose__init__.py", line 21, in import moose._moose as _moose ModuleNotFoundError: No module named 'moose._moose'

Thank you,

On Fri, Aug 23, 2024 at 11:24 PM Anal Kumar @.***> wrote:

Dear Subhasis, Currently, the error I get while importing moose in python3.10 on native windows is - ModuleNotFoundError: No module named 'moose._moose' I'll figure out what I am doing wrong tomorrow. Thank you,

On Fri, Aug 23, 2024 at 6:34 PM Anal Kumar @.***> wrote:

Trying to install it again on a fresh system. Will update once done

On Fri, 23 Aug, 2024, 10:46 am subhacom, @.***> wrote:

@analkumar2 https://github.com/analkumar2 can you try the windows_build ( https://github.com/subhacom/moose-core/tree/windows_build) branch please. We are considering switching to this for better build-automation.

— Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose-core/issues/479#issuecomment-2306308395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZZVNPVSZSBQ6VOCNKLTOLZS3ARFAVCNFSM6AAAAABIXIGRQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBWGMYDQMZZGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

subhacom commented 2 weeks ago

Can you please check the squid demo? Just running squid.py in that folder should plot spikes from default current injection. Somehow that is not working on my MS Windows system, though it works on Ubuntu via WSL. In my case, the channel objects seem to be getting garbage collected(?) or facing some other memory issue so that after returning from the function creating a channel and setting its attributes, the values become some garbage numbers.

analkumar2 commented 2 weeks ago

Dear Subhasis, It is not working in my system either. Some qt4 issues.

On Tue, 27 Aug, 2024, 11:38 am subhacom, @.***> wrote:

Can you please check the squid demo? Just running squid.py in that folder should plot spikes from default current injection. Somehow that is not working on my MS Windows system, though it works on Ubuntu via WSL.

— Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose-core/issues/479#issuecomment-2311648921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZZVNIDMOFAAA3U5T77BRTZTQJWJAVCNFSM6AAAAABIXIGRQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGY2DQOJSGE . You are receiving this because you were mentioned.Message ID: @.***>

analkumar2 commented 1 week ago

Dear Subhasis, I faced another issue. The ion channel fields are not being filled properly when using rdesigneur. For example, ex3.0_squid_currentPulse.py http://ex3.0_squid_currentPulse.py is giving different output in windows and linux. When I do moose.showfield('model/elec/soma/Na'), it gives the following nonsensical values: [/model[0]/elec[0]/soma[0]/Na] Ek =0.0 Gbar =0.0 Gk =0.0009424777960769378 Ik =0.0 X =7.271749017293009e+228 Xpower =0.0009424777960769378 Y =6.013470016999068e-154 Ypower =6.013470016999068e-154 Z =0.0 Zpower =0.0 className =ZombieHHChannel dt =0.0 fieldIndex =0 idValue =466 index =0 instant =0 modulation =0.0 name =Na numData =1 numField =1 path =/model[0]/elec[0]/soma[0]/Na[0] tick =-2 useConcentration =0

Thank you,

On Tue, Aug 27, 2024 at 12:36 PM Anal Kumar @.***> wrote:

Dear Subhasis, It is not working in my system either. Some qt4 issues.

On Tue, 27 Aug, 2024, 11:38 am subhacom, @.***> wrote:

Can you please check the squid demo? Just running squid.py in that folder should plot spikes from default current injection. Somehow that is not working on my MS Windows system, though it works on Ubuntu via WSL.

— Reply to this email directly, view it on GitHub https://github.com/BhallaLab/moose-core/issues/479#issuecomment-2311648921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZZVNIDMOFAAA3U5T77BRTZTQJWJAVCNFSM6AAAAABIXIGRQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGY2DQOJSGE . You are receiving this because you were mentioned.Message ID: @.***>

-- Anal Kumar Research Scholar, Ph.D. National Centre for Biological Sciences Bengaluru

subhacom commented 1 week ago

Yes, I already posted it: https://github.com/BhallaLab/moose-core/issues/483 It is fixed in my version, but got into the rabbit hole of fixing other bugs (new pymoose using PyBind11). Going to be a big pull request.

subhacom commented 1 week ago

Fixed in #485