Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hasan-araav opened this issue Nov 18, 2022 · 12 comments

Comments

@hasan-araav
Copy link

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

@PrithivirajDamodaran
Copy link
Owner

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

@yadhuvarshini
Copy link

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

@qaixerabbas
Copy link

qaixerabbas commented Mar 24, 2023

@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.

@susandong
Copy link

change parrot to parrot.parrot works

@snow00726
Copy link

snow00726 commented Oct 20, 2023

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?

@qaixerabbas
Copy link

@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.

@snow00726
Copy link

@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.

@qaixerabbas
Copy link

@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.

@snow00726
Copy link

@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.

@qaixerabbas
Copy link

@snow00726 I am glad to hear this.

@VinayWaingankar97
Copy link

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

after installing this, still it is not working.

@qaixerabbas
Copy link

@VinayWaingankar97 test it with a new virtual environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants