Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.6: tensorflow install on windows failed with TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

I am new to Python and Tensorflow. I tried to install tensorflow using the command pip install --upgrade tensorflow. However, the installation fails at two points:

  1. Building wheel for wrapt (setup.py)
  2. Running setup.py install for wrapt

During both these instances, the error is the same

TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Can anybody suggest some solution for this error?

like image 796
brij Avatar asked Jan 01 '23 11:01

brij


2 Answers

I had same failure, tried older Python, older TensorFlow but no luck. Then fell upon this and it works for me (I'm on Windows). Make sure you do the following:

set WRAPT_INSTALL_EXTENSIONS=false

before running having pip install tensorflow.

Hope this helps!

like image 197
Chris Avatar answered Jan 03 '23 02:01

Chris


set WRAPT_INSTALL_EXTENSIONS=false

Worked for me, but I had to run it from a command window, not powershell.

like image 31
AdamColton Avatar answered Jan 03 '23 01:01

AdamColton