Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'keras_rewiring' #132

Open
sauravtii opened this issue Sep 21, 2022 · 2 comments
Open

ModuleNotFoundError: No module named 'keras_rewiring' #132

sauravtii opened this issue Sep 21, 2022 · 2 comments
Assignees

Comments

@sauravtii
Copy link

sauravtii commented Sep 21, 2022

Hi, I am trying to run this script, but after running it I am getting the following error. I am using the pypi version of SNN-toolbox. There is no config file as I am facing the error before the config file gets generated.

2022-09-21 17:04:42.640893: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2022-09-21 17:04:42.663173: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-09-21 17:04:42.663183: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "spinnaker_mnist.py", line 9, in <module>
    from keras_rewiring import Sparse, SparseConv2D, SparseDepthwiseConv2D
ModuleNotFoundError: No module named 'keras_rewiring'

@rbodo
Copy link
Contributor

rbodo commented Sep 26, 2022

You are missing a spinnaker-related dependency. You can try installing it from here:
https://devpick.io/project?name=pabogdan/keras_rewiring
This code has been contributed by the spinnaker team and I can't offer support for it, please contact them directly in case of issues.

@sauravtii
Copy link
Author

I followed the instructions mentioned in the link but faced the following issues while installing it:

After using python setup.py develop

running develop
/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(
/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(
running egg_info
creating keras_rewiring.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
writing manifest file 'keras_rewiring.egg-info/SOURCES.txt'
reading manifest file 'keras_rewiring.egg-info/SOURCES.txt'
writing manifest file 'keras_rewiring.egg-info/SOURCES.txt'
running build_ext
Creating /home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/keras-rewiring.egg-link (link to .)
Adding keras-rewiring 0.0.1 to easy-install.pth file

Installed /home/saurav/keras_rewiring
Processing dependencies for keras-rewiring==0.0.1
Searching for colorama
Reading https://pypi.org/simple/colorama/
/home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release
  warnings.warn(
Downloading https://files.pythonhosted.org/packages/77/8b/7550e87b2d308a1b711725dfaddc19c695f8c5fa413c640b2be01662f4e6/colorama-0.4.5-py2.py3-none-any.whl#sha256=854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da
Best match: colorama 0.4.5
Processing colorama-0.4.5-py2.py3-none-any.whl
Installing colorama-0.4.5-py2.py3-none-any.whl to /home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages
Adding colorama 0.4.5 to easy-install.pth file

Installed /home/saurav/miniconda3/envs/tf/lib/python3.9/site-packages/colorama-0.4.5-py3.9.egg
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')

After using python setup.py install

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')

I have also raied this query on the official group of SpiNNaker, but trying it over here as well if anyone might know the solution to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants