No module named 'tensorflow.neuron'

0

Dear developers,

I am relatively new to AWS and EC2 instances. I have an EC2 Inf1 instance and I am trying to set up tensorflow neuron for deep learning applications. When I running the 'Resnet50 Compilation'example provided by AWS : https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-inferentia-tf-neuron.html

Uppon importing tensorflow neuron as follows : 'import tensorflow.neuron as tfn ' I receive the following error message: 'No module named 'tensorflow.neuron''

I check if the package is installed by running the pip list command in the virtual environment. This returns a list that includes the tensorflow-neuron package.

Enter image description here

I also tried to import tensorflow neuron as 'import tensorflow-neuron as tfn'. When I tried this I encountered a different error message Enter image description here

I hope that some of you might have an idea how to solve this.

2 Answers
0

Hi there,

There are a couple of things you can try to mitigate this issue.

  1. Re-installing Tensorflow

Uninstall tensorflow : $ pip uninstall tensorflow Then reinstall it : $ pip install tensorflow

  1. Upgrading the pip

pip install --upgrade pip pip uninstall tensorflow pip install tensorflow

  1. Check the version of the TensorFlow which is installed.

Also check out these links for more references and troubleshooting : https://stackoverflow.com/questions/44976199/installing-tensorflow-examples-in-ec2-instance https://stackoverflow.com/questions/41415629/importerror-no-module-named-tensorflow-python https://stackoverflow.com/questions/42244198/importerror-no-module-named-tensorflow

Thank you!

AWS
SUPPORT ENGINEER
Sagar_T
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions