project394
project394

Reputation: 41

Could not install packages due to an OSError: [Errno2] No such file or directory

When I try to install Tensorflow this message appears. I use the latest version of python and pip.

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\julia\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\tensorflow\\include\\external\\com_github_grpc_grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.h'

It appears on all the older versions of Tensorflow. On the newest release appears this:

ERROR: Could not find a version that satisfies the requirement tensorflow==1.2.0
ERROR: No matching distribution found for tensorflow==1.2.0

Upvotes: 4

Views: 33378

Answers (4)

Atin Bera
Atin Bera

Reputation: 1

It happens due to Maximum Path Length Limitation You can get help from Maximum Path Length Limitation. After that, you can install TensorFlow correctly

Upvotes: 0

最白目
最白目

Reputation: 3634

I did a

pip cache purge

then

pip install <name>

worked

Upvotes: 2

Eden Berdugo
Eden Berdugo

Reputation: 339

In my case, only deleting manually the "leftovers" of the package in the environment directory fixed this problem. path : ... "\venv\Lib\site-packages\ {package name}" make sure you backup before deleting any file.

Upvotes: 4

Related Questions