KevinFasusi / supplychainpy

Supplychainpy is a Python library for supply chain analysis, modelling and simulation. The library assists a workflow that is reliant on Excel and VBA.
http://www.supplychainpy.org/
BSD 3-Clause "New" or "Revised" License
283 stars 99 forks source link

Error when importing supplychainpy #67

Open IlzeAmandaA opened 5 years ago

IlzeAmandaA commented 5 years ago

Hi, have been trying to install the package to Ubuntu via 'pip install supplychainpy==0.0.5' but keep on getting this error: supplychainpy/simulations/sim_summary.c:8290:13: error: too many arguments to function ‘(PyObject ()(PyObject , PyObject const, Py_ssize_t))meth’ return (((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL); ~^~~~~~~ error: command 'gcc' failed with exit status 1

Do you have any suggestions of how to fix it or alternatives for the installation?

zenz commented 5 years ago

Perhaps you are using python 3.7? it seems this lib didn't support 3.7 yet.

zenz commented 5 years ago

Current solution:

git clone the code to local path git clone git@github.com:KevinFasusi/supplychainpy.git then modify file simulations/sim_summary.c on line 8290 from return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL); to return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);

then on the source code root path run:

python setup.py sdist
cd dist
pip3 install supplychainpy-0.0.5.tar.gz

That's it, hope Kevin can revised the code soon.

Goldfox88 commented 4 years ago

any help for when you are using python 3.7 on windows?