Getting error in "Error processing line 1 of /usr/local/lib/python3.4/dist-packages/distutils-precedence.pth:" when using pip

Viewed 43

I tried to install importlib package in my ubuntu 14 using the below command but i got this error,

$sudo pip install importlib

> Error processing line 1 of
> /usr/local/lib/python3.4/dist-packages/distutils-precedence.pth:
> 
>   Traceback (most recent call last):
>     File "/usr/lib/python3.4/site.py", line 173, in addpackage
>       exec(line)
>     File "<string>", line 1, in <module>
>     File "/usr/local/lib/python3.4/dist-packages/_distutils_hack/__init__.py",
> line 194
>       f'spec_for_{name}',
>                        ^   SyntaxError: invalid syntax
> 
> Remainder of file ignored Traceback (most recent call last):   File
> "/usr/local/bin/pip3", line 7, in <module>
>     from pip._internal.cli.main import main   File "/usr/local/lib/python3.4/dist-packages/pip/__init__.py", line 1, in
> <module>
>     from typing import List, Optional ImportError: No module named 'typing'

But whenever i use pip itself, i'm getting this error. please help me resolve the issue, I tried most of the solutions like, upgrading setup tools, tried to reinstall pip.

0 Answers
Related