user9371654
user9371654

Reputation: 2398

Can't install python ast

I have python 3.6. I am trying to install ast library using:

sudo pip3 install ast

I got this error which I do not knwo why and how to solve it.

WARNING: The directory '/home/x/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. WARNING: The directory '/home/x/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting ast   Downloading https://files.pythonhosted.org/packages/4b/fb/2b954d2a38c9a0ef1da6a46737a75b4dbf6f60e5dad0f267a4ec5ece20de/AST-0.0.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-72e5wirc/ast/setup.py", line 6, in <module>
        README = codecs.open(os.path.join(here, 'AST/README'), encoding='utf8').read()
      File "/usr/local/lib/python3.6/codecs.py", line 897, in open
        file = builtins.open(filename, mode, buffering)
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-72e5wirc/ast/AST/README'
    ---------------------------------------- ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-72e5wirc/ast/

Upvotes: 4

Views: 25729

Answers (2)

v.k
v.k

Reputation: 151

ast is part of the standard library of python, you don't need to install it separately.

Upvotes: 4

David Sidarous
David Sidarous

Reputation: 1272

ast is included in python by default, No need to install it. https://docs.python.org/3/library/ast.html

Upvotes: 20

Related Questions