HuLu ViCa
HuLu ViCa

Reputation: 5452

Installation of pyrebase returns an error

I am trying to install pyrebase on a virtual environment of pyhon 3.6, but I get a long list of errors:

Collecting googleapis-common-protos (from gcloud==0.17.0->pyrebase)
  Using cached 


https://files.pythonhosted.org/packages/00/03/d25bed04ec8d930bcfa488ba81a2ecbf7eb36ae3ffd7e8f5be0d036a89c9/googleapis-common-protos-1.5.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/setuptools/__init__.py", line 10, in <module>
    from setuptools.extern.six.moves import filter, filterfalse, map
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/setuptools/extern/__init__.py", line 1, in <module>
    from pkg_resources.extern import VendorImporter
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3017, in <module>
    @_call_aside
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside
    f(*args, **kwargs)
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3045, in _initialize_master_working_set
    dist.activate(replace=False)
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2577, in activate
    declare_namespace(pkg)
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2151, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2091, in _handle_ns
    _rebuild_mod_path(path, packageName, module)
  File "/Users/hugovillalobos/Documents/Code/FirebaseProject/FirebaseVenv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2120, in _rebuild_mod_path
    orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/ht/sqtnbdnx7r5562trfyn3827w0000gn/T/pip-install-ostv_w95/googleapis-common-protos/

I have browsed the questions database, but it seems nobody has submited a similar question so far.

Upvotes: 1

Views: 5846

Answers (2)

Arpit Diwan
Arpit Diwan

Reputation: 41

If your are using Pycharm you can install the pyrebase5 or any other modules directly from it without getting any error.

  1. Go to Files
  2. Open the settings(Ctrl+Alt+s if you're using Win10)
  3. Go to the Project >> project interpreter

Now you can see all the packages installed in the root folder of python. (Make sure your your project interpreter is selected to the python root folder : C:\Users\ (Username)\AppData\Local\Programs\Python\Python38-32

  1. In project interpreter you can see the +(Install) sign in the right. Click on it
  2. the available packages window id open
  3. Now you can search any packages you want to install like pyrebase: you can see all the 7. versions of the pyrebase.
  4. select the package and install package.

Upvotes: 1

Amit
Amit

Reputation: 158

I was facing the same issue and as you can see the error is being caused due to failed gcloud installation so I searched for the same and found a solution here

https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3884

Upgrade setuptools using

pip3 install --upgrade setuptools

upgrade gcloud using

pip3 install --upgrade gcloud

and then install pyrebase

pip3 install pyrebase

This worked for me.

Upvotes: 4

Related Questions