jpn-- / larch

Larch: a Python tool for choice modeling
http://larch.newman.me
GNU General Public License v3.0
41 stars 14 forks source link

Error on importing larch: ModuleNotFoundError: No module named '_core' #6

Closed alexmitrani closed 5 years ago

alexmitrani commented 5 years ago

Hello.

Firstly, thanks very much for sharing Larch and the related help materials, all of which looks like it will be very useful.

I'm keen to get started using Larch but unfortunately I'm stuck right at the start.

I am using a Windows 10 64 bit machine and have set up the "taiga" environment with Anaconda following the suggestion on https://larch.readthedocs.io/en/latest/getting-started.html

I was hoping to start working through the examples, but importing Larch in Python produces an error:

In [21]: import numpy, pandas, os

In [22]: import larch
Traceback (most recent call last):

  File "<ipython-input-22-616f4cc7d303>", line 1, in <module>
    import larch

  File "C:\Users\amitrani\AppData\Local\conda\conda\envs\taiga\lib\site-packages\larch\__init__.py", line 61, in <module>
    from . import core

  File "C:\Users\amitrani\AppData\Local\conda\conda\envs\taiga\lib\site-packages\larch\core.py", line 23, in <module>
    _core = swig_import_helper()

  File "C:\Users\amitrani\AppData\Local\conda\conda\envs\taiga\lib\site-packages\larch\core.py", line 22, in swig_import_helper
    return importlib.import_module('_core')

  File "C:\Users\amitrani\AppData\Local\conda\conda\envs\taiga\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)

ModuleNotFoundError: No module named '_core'

I checked the python architecture as suggested in https://larch.readthedocs.io/en/latest/faq.html:

In[20]: platform.architecture(), sys.maxsize
Out[20]: (('64bit', 'WindowsPE'), 9223372036854775807)

Any help you could offer would be much appreciated. Please let me know if you need any further information.

Kind regards

Alex Mitrani

jpn-- commented 5 years ago

Version 3 has never played nice with Windows. Try version 5, which is the source code that now appears here on GitHub. Updated instructions and examples are now at https://larch.newman.me (I gave up on readthedocs, as it's not simple to build Cython documentation there).

alexmitrani commented 5 years ago

I tried installing version 5 and so far it is working perfectly. Thanks very much for your prompt and helpful reply.