cfiltnlp / pyiwn

A Python based API to access Indian language WordNets.
http://www.cfilt.iitb.ac.in/
Creative Commons Attribution Share Alike 4.0 International
34 stars 19 forks source link

Unable to set up pyiwn in local system #25

Closed ArupDas15 closed 2 years ago

ArupDas15 commented 2 years ago

I am trying to set up pyien in local system. I have run below commands to install the library in Pycharm: git clone https://github.com/riteshpanjwani/pyiwn.git cd pyiwn python setup.py install --user cd ..

After this I am trying to run the commands shown in the example.ipynb but for all commands it showing attribute error.

For e.g. On trying to execute list(map(str, pyiwn.Language)) I get below error Traceback (most recent call last): File "C:\Program Files\Python38\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in AttributeError: module 'pyiwn' has no attribute 'Language'

iwn = pyiwn.IndoWordNet() AttributeError: module 'pyiwn' has no attribute 'IndoWordNet'

The same thing happens when I try to run in Google Colab also. If I restart the runtime it will start working. However, I am interested in running this library locally. Hence I request you to kindly help me in this regard.

ArupDas15 commented 2 years ago

Hi Ritesh, If you do a pip install pyiwn then the Attribute error does not occur in local setup. But then we get the 'charmap' codec can't encode character '\u2588' in position 2: character maps to \<undefined> error. So as per your suggestion over here we need to uninstall the pip version, clone and run setup.py file. But then this will cause the attribute error. Can you please update the pip version in pyPi. Like any other python library I would require to add this to the requirements.txt file and allow users to be able to pip install pyiwn and use this library without any manual fix. I am using this library and it cannot be used locally as it is due to the error. Kindly help.

riteshpanjwani commented 2 years ago

Hey, you can simply mention GitHub repo URL in the requirements.txt file. For example,

package-a==0.0.1 package-b==0.0.1 git+https://github.com/riteshpanjwani/pyiwn@master#egg=pyiwn package-c==0.0.1