gloria icon indicating copy to clipboard operation
gloria copied to clipboard

pip install failed

Open hxu105 opened this issue 10 months ago • 7 comments

Howdy,

I am trying to install gloria via pip, and I did pip install [email protected]:marshuang80/gloria.git. I got this error:

ERROR: Invalid requirement: '[email protected]:marshuang80/gloria.git' Hint: It looks like a path. File '[email protected]:marshuang80/gloria.git' does not exist.

Could you help to take a look at it?

Many thanks!

hxu105 avatar Apr 04 '24 16:04 hxu105

It is not working as It is taking the URL as file path. To resolve it run the following command: pip install git+https://github.com/marshuang80/gloria.git.

Just replaced @ with + to indicate the request from URL instead of treating it as file and added HTTPS to make the URL recognizable to pip

rshayer95 avatar Apr 04 '24 16:04 rshayer95

Thank you, but I found another error when importing gloria. AttributeError: module 'gloria' has no attribute 'constants'

hxu105 avatar Apr 04 '24 17:04 hxu105

Or maybe you can directly download gloria package repository manually and place it where other package folders are. I think it would work since the folder gonna have init.py file there. They are mainly in site-packages folder or maybe in some other folder. But you need to find the folder on your system and place it there.

rshayer95 avatar Apr 04 '24 18:04 rshayer95

I downloaded the gloria to my site-packages, but it meets the same error AttributeError: module 'gloria' has no attribute 'constants'

hxu105 avatar Apr 04 '24 18:04 hxu105

maybe we need to relocate constants or reimport constants in init.py file and use alias.

rshayer95 avatar Apr 04 '24 23:04 rshayer95

In gloria/gloria/init.py file try to add the following line

from . import constants

If you see the code they imported builder but not constants from the directory, maybe they didn't placed at the file at right place to import it along with other files.

or the other option is to put constants.py one level up in hierarchy. For example, if file location is currently gloria/gloria/constants.py. It should be gloria/constants.py

Try both one by one if one works then great otherwise can always troubleshoot

rshayer95 avatar Apr 05 '24 17:04 rshayer95

Thank you for the suggestion, I will try those in a couple of days, and I will inform you whether they fix this issue or not. Many thanks again!

hxu105 avatar Apr 05 '24 17:04 hxu105