• Register
2 votes
50 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

Please log in or register to answer this question.

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
1 answer 14 views
14 views
Problem: How to fix this error: socket.error: command python setup.py egg_info failed HELP! I need help understanding this error: command python setup.py egg_info failed Can someone please help fix this, I am new in python() : command python setup.py egg_info failed
asked Mar 1 Mashhoodch 13k points
0 votes
1 answer 67 views
67 views
Problem: I am trying to install python package rpy2 with pip install on Ubuntu 16.04: pip install rpy2==2.2.7 but get error message (see full output below): Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EuOI6K/unroll/
asked Jan 10 Mashhoodch 13k points
0 votes
3 answers 266 views
266 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, 2020 LizzyM 6.1k points
0 votes
1 answer 462 views
462 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
0 votes
0 answers 2 views
2 views
Problem: What went wrong that caused the error?
asked 15 hours ago salim1 32.1k points
0 votes
1 answer 22 views
22 views
command "python setup.py egg_info" failed with error code 1 in
asked Feb 16 ArifulIslam 7.5k points
0 votes
1 answer 15 views
15 views
Problem: I'm new to Python and have been trying to install some packages with pip. But pip install unroll gives me Command "python setup.py egg_info" failed with error code 1 in C:\Users\MARKAN~1\AppData\Local\Temp\pip-build-wa7uco0k\unroll\ How can I solve this?
asked Feb 18 Mashhoodch 13k points
0 votes
1 answer 43 views
43 views
Problem: any help : Python: can't open file 'get-pip.py': [errno 2] no such file or directory.
asked Mar 6 Wafa Abu Yousef 6.1k points
2 votes
1 answer 3.7K views
3.7K 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, 2020 samhaz 5k points
0 votes
1 answer 16 views
16 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, 2020 LizzyM 6.1k points