I tried and search many issues but no way. I got this error.
C:\Users\Hakan\PycharmProjects>pip install --upgrade google-cloud-translate
Collecting google-cloud-translate
Using cached https://files.pythonhosted.org/packages/40/32/e17ba4b6586c31afe08a82fd0e3437906757a5fedb29e44d695721ffdbb8/google_cloud_translate-1.3.1-py2.py3-none-any.whl
Collecting google-cloud-core<0.29dev,>=0.28.0 (from google-cloud-translate)
Using cached https://files.pythonhosted.org/packages/0f/41/ae2418b4003a14cf21c1c46d61d1b044bf02cf0f8f91598af572b9216515/google_cloud_core-0.28.1-py2.py3-none-any.whl
Collecting google-api-core<2.0.0dev,>=0.1.1 (from google-cloud-translate)
Using cached https://files.pythonhosted.org/packages/f1/88/7055a6248cb4682c4788a3d695a2e119c8502a618ce4bee72ef58c595f65/google_api_core-1.5.2-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: protobuf>=3.4.0 in c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate) (3.6.1)
Collecting google-auth<2.0dev,>=0.4.0 (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate)
Using cached https://files.pythonhosted.org/packages/24/62/8b9612b1055cfbecd577e252446fe5f939f6818d0b7ddc27bb872f233cd4/google_auth-1.6.1-py2.py3-none-any.whl
Collecting googleapis-common-protos!=1.5.4,<2.0dev,>=1.5.3 (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate)
Requirement already satisfied, skipping upgrade: six>=1.10.0 in c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate) (1.11.0)
Requirement already satisfied, skipping upgrade: setuptools>=34.0.0 in c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate) (39.1.0)
Requirement already satisfied, skipping upgrade: pytz in c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate) (2018.5)
Requirement already satisfied, skipping upgrade: requests<3.0.0dev,>=2.18.0 in c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages (from google-api-core<2.0.0dev,>=0.1.1->google-cloud-translate) (2.19.1)
No metadata found in c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\users\hakan\anaconda3\envs\tensorflowexample\lib\site-packages\requests-2.19.1.dist-info\METADATA'
Says No such file or directory: But this dir. and file exists.
I find found that at above directory, there is a file called METADATA.json and I made a copy of it METADATA only (without extension) Its funny but worked.
could you tell me how to solve it? I met the same problem while installing numpy.
i couldnt find the directory and the file. would you mind telling me?
Was able to get past this error by going to /Users/thaparp/anaconda3/lib/python3.7/site-packages and moving the numpy-1.16.1.dist-info folder out then running pip install numpy to reinstall it. (I moved it rather than deleting it just in case I needed to put it back but I ended up deleting it after)
Hello everyone.
I got the same error when I tried installing tensorflow library. My error was the following:
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\moj
ifajlovi\faks\11master\1semestar\siap-sistemizaistrazivanjeianalizupodataka_(datamining)\projek
at\rad\venvs\siap_venv\Lib\site-packages\tensorflow_estimator\python\estimator\canned\line
ar_optimizer\python\utils\__pycache__\sharded_mutable_dense_hashtable.cpython-37.pyc'
So, there was no sharded_mutable_dense_hashtable.cpython-37.pyc file in the __pycache__ directory. But, sharded_mutable_dense_hashtable.cpython-37.pyc file was in the utils directory (which is the parent directory of __pycache__ directory).
That's why I tried manually copying the sharded_mutable_dense_hashtable.cpython-37.pyc file in the __pycache__ directory. When I tried that, I had a copy error which stated that the path was too long, so it couldn't put the file in the directory.
So, the solution:
Install the desired python package (in my case tensorflow) in the folder which has shorter path (for example C:/my_py_packages/some_package).
Try to use --user in the command to give admin permission. It worked with me
Dont do Conda uninstallation. It actually removes the packages and then you would start wondering.
I have same problem too in Ubuntu 18.04 while installing anything
You can uninstall Python first and then re-install it; at the last step click disable path length limit.
Problem resolved!

@PooneetThaper suggestion was useful for me. And its the easiest, simplest and logical.
I had this error
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/user/anaconda3/lib/python3.7/site-packages/google_pasta-0.1.8.dist-info/METADATA'
So I moved the folder google_pasta-0.1.8.dist-info out and ran the main installation again. It automatically installed google_pasta-xxxx with a METADATA file to the previous directory and installed the main target package I was trying to install.
SOLVED!
For me the problem was a too long name of a file which give me the error.
To solve you have to make Windows 10 Accept Long File Paths.
For doing that check this out:
https://helpdeskgeek.com/how-to/how-to-fix-filename-is-too-long-issue-in-windows/
@areebsyed exact same issue with google_pasta-0.1.8.dist-info and your solution worked for me! thanks
I just created an empty file METADATA and put it in the location pip was looking. The error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/cffi-1.14.0.dist-info/METADATA'
Solution:
touch /home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/cffi-1.14.0.dist-info/METADATA
Use >>pip install ** --user in the Prompt Anaconda
** It's the library you want to install
This worked well with me
In my case, it was pandas. I actually solved this by moving pandas.dist-info to another folder, just for fun but it did work :)
@PooneetThaper suggestion was useful for me. And its the easiest, simplest and logical.
I had this error
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/user/anaconda3/lib/python3.7/site-packages/google_pasta-0.1.8.dist-info/METADATA'So I moved the folder google_pasta-0.1.8.dist-info out and ran the main installation again. It automatically installed google_pasta-xxxx with a METADATA file to the previous directory and installed the main target package I was trying to install.
thanks! the same problem, it worked for me
I worked err no.21 meatdata issue but didn't solved . The spyder did not install on my laptop
Nice, i solved
koursiou.[email protected]
Good
But I also solved that problem 😉
On Mon, Jul 6, 2020, 4:32 AM Moussatassia notifications@github.com wrote:
Nice, i solved
koursiou.[email protected]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/google-cloud-python/issues/6647#issuecomment-653950057,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APU356PQ55HGTRLL5X6MPHDR2EBATANCNFSM4GGF5DNQ
.
Uninstall all earlier versions using
pip uninstall biopython
pip uninstall bio
pip uninstall Bio
conda uninstall biopython
conda uninstall bio
conda uninstall Bio
Then Install using
conda install biopython
This works for me.
Try to use --user in the command to give admin permission. It worked with me
This worked for me too example pip3 install --upgrade pandas --user
I find found that at above directory, there is a file called
METADATA.jsonand I made a copy of itMETADATAonly (without extension) Its funny but worked.
Lmao that somehow worked for m as well, strange how this things work
Faced a similar issue and was not able to find a METADATA file in the parent directory. I tried to upgrade pip and then inside of the parent directory I copied the metadata file from pip's directory and it worked cp pip-20.2.3.dist-info/METADATA [broken directory]
I just created an empty file METADATA and put it in the location pip was looking. The error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/cffi-1.14.0.dist-info/METADATA'Solution:
touch /home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/cffi-1.14.0.dist-info/METADATA
Cool!simple solution but useful
I solved this by enabling the LongPathsEnabled on Windows Registry.
Was able to get past this error by going to
/Users/thaparp/anaconda3/lib/python3.7/site-packagesand moving thenumpy-1.16.1.dist-infofolder out then runningpip install numpyto reinstall it. (I moved it rather than deleting it just in case I needed to put it back but I ended up deleting it after)
What is the equivalent path of this folder on Windows?
Please send me Google meet link daily.
Le jeu. 18 févr. 2021 à 06:16, Shaikha Alkhuder notifications@github.com
a écrit :
Was able to get past this error by going to
/Users/thaparp/anaconda3/lib/python3.7/site-packages and moving the
numpy-1.16.1.dist-info folder out then running pip install numpy to
reinstall it. (I moved it rather than deleting it just in case I needed to
put it back but I ended up deleting it after)What is the equivalent path of this folder on Windows?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/google-cloud-python/issues/6647#issuecomment-781061213,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIKEBVAIPJASXJKQ4FBX5HDS7SPDTANCNFSM4GGF5DNQ
.
Was able to get past this error by going to
/Users/thaparp/anaconda3/lib/python3.7/site-packagesand moving thenumpy-1.16.1.dist-infofolder out then runningpip install numpyto reinstall it. (I moved it rather than deleting it just in case I needed to put it back but I ended up deleting it after)What is the equivalent path of this folder on Windows?
I'd check wherever your python is installed. It would be a which python on any unix terminal but there might be a command line equivalent.
just remove that conflict folder numpy-1.16.1.dist-info and uninstall and reinstall numpy should work.
I had teh same problem. error during instalation with pip due to METADATA missing directory. I solved it
conda update -c conda-forge biopython
pip install [packageName]
Most helpful comment
I find found that at above directory, there is a file called
METADATA.jsonand I made a copy of itMETADATAonly (without extension) Its funny but worked.