Parrot_Paraphraser icon indicating copy to clipboard operation
Parrot_Paraphraser copied to clipboard

ImportError: cannot import name 'Parrot' from partially initialized module 'parrot' (most likely due to a circular import) (D:\python\paraphrase\parrot.py)

Open hasan-araav opened this issue 2 years ago • 12 comments

I am getting this issue. I have installed Parrot corectly but stil showing this eeor. Pls help.

hasan-araav avatar Nov 18 '22 15:11 hasan-araav

I added a new demo notebook, and everything works fine. (check for the link in Readme)

PrithivirajDamodaran avatar Dec 27 '22 17:12 PrithivirajDamodaran

I am facing same issue while working in local , Please help me

yadhuvarshini avatar Jan 31 '23 06:01 yadhuvarshini

@hasan-araav Rename your Python file from "parrot.py" to something else. As the library name is also parrot so Python Interpreter is throwing circular import error.

qaixerabbas avatar Mar 24 '23 06:03 qaixerabbas

change parrot to parrot.parrot works

susandong avatar Jul 04 '23 01:07 susandong

I also encountered this problem, this is the problem description:ImportError: cannot import name 'Parrot' from 'parrot' (D:\Python\Anaconda\envs\nlp_env\lib\site-packages\parrot\init.py), how can I solve it?

snow00726 avatar Oct 20 '23 08:10 snow00726

@snow00726 make sure you have installed the library. From the error message, it seems that there could be a version mismatch error. Try to uninstall and install it again in a virtual environment.

qaixerabbas avatar Oct 20 '23 09:10 qaixerabbas

@snow00726 make sure you have installed the library. From the error message, it seems that there could be a version mismatch error. Try to uninstall and install it again in a virtual environment.

The requirements.txt file requires downloading parrot-1.0, but I can't find parrot 1.0 in pypi. I've downloaded parrot 0.0.16, but it doesn't seem to work, it still reports the same error.

snow00726 avatar Oct 23 '23 08:10 snow00726

@snow00726 Do not install from the PyPI, I guess that could be the error.

For a fresh install please

  1. Create a new virtual environment
  2. activate it
  3. and then run the following command

pip install git+https://github.com/PrithivirajDamodaran/Parrot_Paraphraser.git

This should work. I just tested and it is working perfectly for me.

qaixerabbas avatar Oct 23 '23 08:10 qaixerabbas

@snow00726 Do not install from the PyPI, I guess that could be the error.

For a fresh install please

  1. Create a new virtual environment
  2. activate it
  3. and then run the following command

pip install git+https://github.com/PrithivirajDamodaran/Parrot_Paraphraser.git

This should work. I just tested and it is working perfectly for me.

Thank you! It works for me.

snow00726 avatar Oct 24 '23 11:10 snow00726

@snow00726 I am glad to hear this.

qaixerabbas avatar Oct 25 '23 08:10 qaixerabbas

pip install git+https://github.com/PrithivirajDamodaran/Parrot_Paraphraser.git

after installing this, still it is not working.

VinayWaingankar97 avatar Apr 26 '24 11:04 VinayWaingankar97

@VinayWaingankar97 test it with a new virtual environment.

qaixerabbas avatar Apr 29 '24 07:04 qaixerabbas