• Register
1 vote
154 views

Problem:

I am new in programming language. I was trying to setup and then upgrade gcloud using python.I used the command line in my windows command prompt.

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\

Why this is not installing and giving error? Please help me to solve this problem.

10 7 2
6,060 points

Please log in or register to answer this question.

1 Answer

1 vote
 
Best answer

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

If it is not working for you let me know.

Happy coding. 

11 6 4
34,950 points

Related questions

0 votes
1 answer 4 views
4 views
Problem: I have been trying to solve this problem, please help > Attributeerror: 'series' object has no attribute 'sort'
asked 2 days ago Junia Phoebe 15.3k points
0 votes
1 answer 898 views
898 views
Problem: I am working on the sort function but while doing a small problem I am getting a error can you please what I am doing wrong,Program that takes a list of student name and sorts them to create a class roll number. The list of names will be given on line separated by ... item.sort(lambda x, y: cmp(x.lower(),y.lower())) print(item) AttributeError: 'str' object has no attribute 'sort'" Error"
asked Jun 9, 2020 Gavin 15.3k points
0 votes
1 answer 4 views
4 views
Problem: Please, want an answer >Attributeerror: '_namespacepath' object has no attribute 'sort'
asked 5 days ago Sawyer Parviz 13.4k points
0 votes
1 answer 18 views
18 views
Problem: Can anyone help me with this problem? > Attributeerror: 'tensor' object has no attribute 'numpy'
asked 3 days ago Junia Phoebe 15.3k points
0 votes
1 answer 2 views
2 views
Problem: Where can I find a solution for this? >Attributeerror: 'nonetype' object has no attribute 'lower'
asked 4 days ago Sawyer Parviz 13.4k points
0 votes
1 answer 32 views
32 views
Problem: I'm trying to delete the first 24 rows of my pandas dataframe. Searching on the web has led me to believe that the best way to do this is by using the pandas 'drop' function. However, whenever I try to use it, I get the error: AttributeError: 'numpy. ... should do to delete the first 24 rows of my dataframe. (This was all done using Python 3 on a Jupyter notebook on my local machine)
asked May 3 muktaa 34.6k points
1 vote
1 answer 22 views
22 views
Problem: I am working on a dictionary but I get an : Attributeerror: 'nonetype' object has no attribute 'update'.
asked May 1 PkGuy 23.5k points
1 vote
2 answers 8 views
8 views
Problem: I have a string where I find this error: Attributeerror: 'nonetype' object has no attribute 'groups'.
asked Apr 25 PkGuy 23.5k points
0 votes
1 answer 36 views
36 views
Problem: Hello! I am a new programmer and I recently learned the concept of container types in Python. I have never worked with dictionaries and lists before. I tried running the following program in which I am adding the items into a dictionary through a list: lst = ... but I am unable to understand why it is showing an error with the dictionary. Could someone please help me sort this error out?
asked Apr 6 Code Learner 9.9k points
0 votes
1 answer 44 views
44 views
Problem: My friend's computer showing this error by two to three days,he tried to fix but he can't able to, then he requested me to help but i am a beginner in this field then i think i have to post here my problem by which i can got my answer, can anyone help me out?
asked Apr 4 niyatiry 3.9k points