• Register
2 votes
27 views

Problem:

I am new in programming language. I was trying to setup and then upgrade gcloud using python.
I used the command:
pip install --upgrade gcloud

After that it shows:

Collecting gcloud
  Downloading gcloud-0.18.3.tar.gz (454kB)
    100% |████████████████████████████████| 460kB 1.0MB/s
Requirement already up-to-date: httplib2>=0.9.1 in c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages (from gcloud)
Collecting googleapis-common-protos (from gcloud)
  Using cached googleapis-common-protos-1.5.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\__init__.py", line 10, in <module>
        from setuptools.extern.six.moves import filter, filterfalse, map
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
        from pkg_resources.extern import VendorImporter
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3017, in <module>
        @_call_aside
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3003, in _call_aside
        f(*args, **kwargs)
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3045, in _initialize_master_working_set
        dist.activate(replace=False)
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2577, in activate
        declare_namespace(pkg)
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2151, in declare_namespace
        _handle_ns(packageName, path_item)
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2091, in _handle_ns
        _rebuild_mod_path(path, packageName, module)
      File "c:\users\bid\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2120, in _rebuild_mod_path
        orig_path.sort(key=position_in_sys_path)

And then a error message:

 AttributeError: '_NamespacePath' object has no attribute 'sort'
   
Command "python setup.py egg_info" failed with error code 1 in C:\Users\bid\AppData\Local\Temp\pip-build-ppc44asr\googleapis-common-protos\

Whats is happening here can anyone help?

10 7 2
6,060 points

1 Answer

0 votes

Answer:

The error you are having becuse your setuptools may be out of date.

Try to upgrade your setuptools and please use your setup tools for your specific versions of python.

To upgrade your setuptools run the command:

pip install --upgrade setuptools

Let me know if it is working for you.

11 6 4
34,950 points

Related questions

0 votes
3 answers 204 views
204 views
I am new in python programming. I am tryin gto iinstall some packages with pip commands. I tried to install a package called unroll by using the command: pip[ install unroll but it gives me some error like : "python setup.py egg_info" failed with error code 1 How can I solve this problem? How can I check my pip version? How can I upgrade my pip version?
asked Mar 9 LizzyM 6.1k points
0 votes
1 answer 375 views
375 views
Problem : When I executed: pip install xgboost I got this: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w4/w49s3mn91plbhyjwf8qjkpxc0000gn/T/pip-build-61dms1/xgboost/
asked Oct 21, 2019 peterlaw 6.9k points
2 votes
1 answer 1.9K views
1.9K views
Problem: When I try to run the below command on my command prompt: python get-pip.py It shows the following message: C:\Users\ASUS>python get-pip.py python: can't open file 'get-pip.py': [Errno 2] No such file or directory How can I have pip installed in my system. Then why am I getting this error message and why I can not open this file. Thanks in advance.
asked May 6 samhaz 5k points
0 votes
1 answer 12 views
12 views
Problem: I am new to programming language. Yesterday I installed python in system. I went to my command prompmt and run the command : python and it shows: Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 01:54:44) [MSC v.1916 64 bit (AMD64)] on ... a different output : python' is not recognized as an internal or external command, operable program or batch file Why am I seeig this , Please help.
asked Mar 22 LizzyM 6.1k points
0 votes
1 answer 172 views
172 views
Problem : Today I ran into a weird error trying to install Django as follows 'pip3' is not recognized as an internal or external command, operable program or batch file.
asked Nov 15, 2019 peterlaw 6.9k points