Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 416
Next
Answered
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 0
Kenil Vasani
Asked: December 11, 20202020-12-11T20:35:56+00:00 2020-12-11T20:35:56+00:00In: Python

Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory \\METADATA

  • 0

I relatively new to coding so I am not (yet) running virtual environments. Rather, I am just downloading packages with pip straight to my pc to run python 3.7 in atom.

When I tried to use pip the other day to install the scrapy package like so -m pip install --user scrapy

I got this error: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\\users\\adrian\\appdata\\roaming\\python\\python37\\site-packages\\pip-19.0.1.dist-info\\METADATA'

Most of the other answers I have seen on related errors had people use conda to install some type of fix I think? When I tried to use conda to execute one of the fixes I recieved a CondaHTTPError: SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/noarch/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available.

Any direction would be heartily appreciated 🙂

condapippython
  • 1 1 Answer
  • 10 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    1. Rohit Patel

      Rohit Patel

      • 0 Questions
      • 98 Answers
      • 0 Best Answers
      • 0 Points
      View Profile
      Best Answer
      Rohit Patel
      2020-12-11T20:35:26+00:00Added an answer on December 11, 2020 at 8:35 pm

      TL;DR:

      Problem: Long install path

      Solution: Install the desired python package (in my case tensorflow) in the folder which has a shorter path (for example C:/my_py_packages/some_package) or set the registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\[email protected] to 1 as mentioned here.

      Original answer:
      I got here by having this kind of 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 a shorter path (for example C:/my_py_packages/some_package) or set the registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\[email protected] to 1 as mentioned here.

      • 1
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      create-react-app is not working since version 4.0.1

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com