Facing issues while installing keras_rewiring

30 views
Skip to first unread message

Saurav Pawar

unread,
Sep 26, 2022, 3:49:39 AM9/26/22
to SpiNNaker Users Group
Hi,

While trying out this code (https://github.com/NeuromorphicProcessorProject/snn_toolbox/blob/master/examples/mnist_keras_spiNNaker_sparse.py) I was getting this error (https://github.com/NeuromorphicProcessorProject/snn_toolbox/issues/132). After getting a response from the maintainer of the repository I tried installing keras_wiring by following the steps mentioned over here (https://devpick.io/project?name=pabogdan/keras_rewiring). But after that I am facing the following issue.

```
running install
/home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing keras_rewiring.egg-info/PKG-INFO
writing dependency_links to keras_rewiring.egg-info/dependency_links.txt
writing requirements to keras_rewiring.egg-info/requires.txt
writing top-level names to keras_rewiring.egg-info/top_level.txt
reading manifest file 'keras_rewiring.egg-info/SOURCES.txt'
writing manifest file 'keras_rewiring.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying keras_rewiring.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying keras_rewiring.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying keras_rewiring.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying keras_rewiring.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying keras_rewiring.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/keras_rewiring-0.0.1-py3.9.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing keras_rewiring-0.0.1-py3.9.egg
Copying keras_rewiring-0.0.1-py3.9.egg to /home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages
Removing keras-rewiring 0.0.1 from easy-install.pth file
Adding keras-rewiring 0.0.1 to easy-install.pth file

Installed /home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/keras_rewiring-0.0.1-py3.9.egg
Processing dependencies for keras-rewiring==0.0.1
Searching for statsmodel
Reading https://pypi.org/simple/statsmodel/
Couldn't find index page for 'statsmodel' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
No local packages or working download links found for statsmodel
error: Could not find suitable distribution for Requirement.parse('statsmodel')
```

Thanks,
Saurav

Andrew Gait

unread,
Sep 26, 2022, 4:17:51 AM9/26/22
to Saurav Pawar, SpiNNaker Users Group
Hi Saurav,

Petrut doesn't work on the project any more so it may be a while before he is able to do the fix (I have made a repository fork and sent a request).  The problem is that it should be "statsmodels", not "statsmodel".  If you want to make it work yourself then simply edit the setup.py and requirements.txt files so that they say "statsmodels" instead of "statsmodel" and you should find it now installs correctly.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Saurav Pawar <saurav...@gmail.com>
Sent: 26 September 2022 08:49
To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: [SpiNNaker Mailing List] Facing issues while installing keras_rewiring
 
--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/spinnakerusers/34c72e69-048d-473f-93c3-fc1dffec5a4dn%40googlegroups.com.

Saurav Pawar

unread,
Sep 26, 2022, 4:33:23 AM9/26/22
to SpiNNaker Users Group
Thanks Andrew, I was able to solve the issue. But now, I am facing another issue for tensorflow. Should I download the latest tensorflow version ?
If not, how should I proceed ?

Saurav : )
Screenshot from 2022-09-26 12-30-56.png

Andrew Gait

unread,
Sep 26, 2022, 5:26:54 AM9/26/22
to Saurav Pawar, SpiNNaker Users Group
Hi Saurav,

Yes, I think you could try the latest tensorflow version - from reading round a bit it looks like the version there (2.2.1) won't work with python 3.9, so it's probably best if you try the latest version instead.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 26 September 2022 09:33

To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: Re: [SpiNNaker Mailing List] Facing issues while installing keras_rewiring
 

Saurav Pawar

unread,
Sep 27, 2022, 4:30:17 AM9/27/22
to SpiNNaker Users Group
Hi Andrew,

I did install tensorflow's latest version but after installation I faced the following issue for keras. I also tried removig the specific version for keras from setup.py, but after that I was facing some errors in importing the required stuff (which is now a part of keras.layers).

```
Installed /home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/Keras-2.3.1-py3.9.egg
error: Keras 2.3.1 is installed but keras<2.10.0,>=2.9.0rc0 is required by {'tensorflow'}
```

Andrew Gait

unread,
Sep 27, 2022, 4:41:11 AM9/27/22
to Saurav Pawar, SpiNNaker Users Group
Hi Saurav,

That error message doesn't help very much.  Have you tried installing a version of keras that does work, and then if there are other imports it says you need, just importing them as well?

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 27 September 2022 09:30

Saurav Pawar

unread,
Sep 30, 2022, 9:07:44 AM9/30/22
to SpiNNaker Users Group
Hi,

I did install the latest version of keras, but now facing some other issues : (

Best,
Saurav

Andrew Gait

unread,
Sep 30, 2022, 9:13:49 AM9/30/22
to Saurav Pawar, SpiNNaker Users Group
Hi Saurav,

If you are having problems with keras then it's best if you ask them about it: https://github.com/keras-team/keras/issues

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

Sent: 30 September 2022 14:07
Reply all
Reply to author
Forward
0 new messages