# Tensorflow and Keras installation problem

**URL:** https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253
**Category:** Support
**Created:** [February 22, 2023, 5:57pm UTC](https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253 "2023-02-22T17:57:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ibrahim\_demirbag](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/ibrahim_demirbag/32/3364_2.png) [@Ibrahim\_demirbag](https://discuss.pynq.io/u/Ibrahim_demirbag)
#### Post date: [February 22, 2023, 5:57pm UTC](https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253/1 "2023-02-22T17:57:35Z")

</div>

Hi, i was trying to install tensorflow and keras libraries on PYNQ board for a university project. I managed to install and run the tensorflow version in the 1st link, but I need the tensorflow version in the 2nd link because this version of tensorflow also includes the keras library. I installed this version of Tensorflow on the board but it gave me the following error. do you know the solution for this error

1st link  
wget [https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v0.9.0/tensorflow-0.9.0-py3-none-any.whl](https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v0.9.0/tensorflow-0.9.0-py3-none-any.whl)

/usr/bin/python3 -m pip install tensorflow-0.9.0-py3-none-any.whl

2.nd link

wget [https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl](https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl)

/usr/bin/python3 -m pip install tensorflow-1.9.0-py3-none-any.whl

Terminal image and error images

 ![5](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/7/796ded64a91426195c53d91046bd8775f66c9ea8.jpeg)

---

<div class="post-metadata">

### Author: ![mrdunker](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/mrdunker/32/5667_2.png) [@mrdunker](https://discuss.pynq.io/u/mrdunker)
#### Post date: [March 4, 2024, 12:21pm UTC](https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253/2 "2024-03-04T12:21:08Z")

</div>

Hello Ibrahim, I am also trying to install tensorflow on PYNQ-Z2 on image v2.6

Following the repo: danishgufran/tensorflow-2.X-for-Xilinx-Pynq-Z2

Tensorflow got installed but,some sort of mismatch happened i guess so its giving some error when i try to import tensorflow, and ideas?

Following is the log when i tried to import tensorflow

xilinx@pynq:~~$ python3 --version  
Python 3.6.5  
xilinx@pynq:~~$ python3  
Python 3.6.5 (default, Apr 1 2018, 05:46:30)  
[GCC 7.3.0] on linux  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import tensorflow  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow/ **init**.py”, line 101, in  
> > > from tensorflow\_core import \*  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow\_core/ **init**.py”, line 40, in  
> > > from tensorflow.python.tools import module\_util as \_module\_util  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow/ **init**.py”, line 50, in **getattr**  
> > > module = self.\_load()  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow/ **init**.py”, line 44, in \_load  
> > > module = \_importlib.import\_module(self. **name** )  
> > > File “/usr/lib/python3.6/importlib/ **init**.py”, line 126, in import\_module  
> > > return \_bootstrap.\_gcd\_import(name[level:], package, level)  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow\_core/python/ **init**.py”, line 50, in  
> > > from tensorflow.python import \_pywrap\_utils  
> > > ImportError: /usr/local/lib/python3.6/dist-packages/tensorflow\_core/python/\_pywrap\_utils.so: undefined symbol: PyThread\_tss\_alloc

---

<div class="post-metadata">

### Author: ![mrdunker](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/mrdunker/32/5667_2.png) [@mrdunker](https://discuss.pynq.io/u/mrdunker)
#### Post date: [March 4, 2024, 1:05pm UTC](https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253/3 "2024-03-04T13:05:53Z")

</div>

Hello Ibrahim, I am also trying to install tensorflow on PYNQ-Z2 on image v2.6

Installed using : danishgufran/tensorflow-2.X-for-Xilinx-Pynq-Z2

Tensorflow got installed but,some sort of mismatch happened i guess so its giving some error when i try to import tensorflow, and ideas?

Following is the log when i tried to import tensorflow

xilinx@pynq:~~$ python3 --version  
Python 3.6.5  
xilinx@pynq:~~$ python3  
Python 3.6.5 (default, Apr 1 2018, 05:46:30)  
[GCC 7.3.0] on linux  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import tensorflow  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow/ **init**.py”, line 101, in  
> > > from tensorflow\_core import \*  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow\_core/ **init**.py”, line 40, in  
> > > from tensorflow.python.tools import module\_util as \_module\_util  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow/ **init**.py”, line 50, in **getattr**  
> > > module = self.\_load()  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow/ **init**.py”, line 44, in \_load  
> > > module = \_importlib.import\_module(self. **name** )  
> > > File “/usr/lib/python3.6/importlib/ **init**.py”, line 126, in import\_module  
> > > return \_bootstrap.\_gcd\_import(name[level:], package, level)  
> > > File “/usr/local/lib/python3.6/dist-packages/tensorflow\_core/python/ **init**.py”, line 50, in  
> > > from tensorflow.python import \_pywrap\_utils  
> > > ImportError: /usr/local/lib/python3.6/dist-packages/tensorflow\_core/python/\_pywrap\_utils.so: undefined symbol: PyThread\_tss\_alloc

---

<div class="post-metadata">

### Author: ![Ibrahim\_demirbag](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/ibrahim_demirbag/32/3364_2.png) [@Ibrahim\_demirbag](https://discuss.pynq.io/u/Ibrahim_demirbag)
#### Post date: [March 8, 2024, 10:07pm UTC](https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253/4 "2024-03-08T22:07:56Z")

</div>

Hello, sorry for replying late. While installing the tensorflow version from the github account you shared, but it gave me error ERROR: tensorflow-2.1.0-cp36-none-linux\_armv7l.whl is not a supported wheel on this platform. I’m sorry I can’t help because of this, I’ll let you know if I find a solution.

---

<div class="post-metadata">

### Author: ![mrdunker](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/mrdunker/32/5667_2.png) [@mrdunker](https://discuss.pynq.io/u/mrdunker)
#### Post date: [March 12, 2024, 4:57am UTC](https://discuss.pynq.io/t/tensorflow-and-keras-installation-problem/5253/5 "2024-03-12T04:57:31Z")

</div>

Thanks for trying. I guess it is not a supported version because your python version is not 3.6. That’s just my guess. The file with the name **cpxx** should match with the python version installed i guess.  
For example, if one has python 3.4 installed one should use the file "tensorflow-2.1.0-cp34-none-linux\_armv7l.whl " and not the one with “36”.
