0

I am using poetry in my project, to know about poetry here.
After installing poetry using command.
Now when I am running poetry install & I am getting the following error.

C:\Users\User\PycharmProjects\pythonProject>poetry install
Installing dependencies from lock file

Package operations: 2 installs, 0 updates, 0 removals
                                                     
  • Installing websockets (8.1)                      

  EnvCommandError

  Command C:\Users\User\PycharmProjects\pythonProject\.venv\Scripts\pip.exe install --no-deps file:///C:/Users/User/AppData/Local/pypoetry/Cache/artifacts/f5/4b/eb/5cfd043e0dbfe90c838bc1570b070131b9cc1f0ebf4a45a2c3e0fe9eb9/websocket
s-8.1.tar.gz errored with the following return code 1, and output:
  Processing c:\users\user\appdata\local\pypoetry\cache\artifacts\f5\4b\eb\5cfd043e0dbfe90c838bc1570b070131b9cc1f0ebf4a45a2c3e0fe9eb9\websockets-8.1.tar.gz
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'done'
  ERROR: No .egg-info directory found in C:\Users\User\AppData\Local\Temp\pip-pip-egg-info-n_f6amnr


  at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\utils\env.py:1195 in _run
      1191│                 output = subprocess.check_output(
      1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1193│                 )
      1194│         except CalledProcessError as e:
    → 1195│             raise EnvCommandError(e, input=input_)
      1196│
      1197│         return decode(output)
      1198│
      1199│     def execute(self, bin, *args, **kwargs):

Similarly:

C:\Users\User\PycharmProjects\pythonProject>poetry install                                                                                    
Installing dependencies from lock file

Package operations: 29 installs, 2 updates, 0 removals

  • Installing markupsafe (2.1.1)

  Command C:\Users\User\PycharmProjects\pythonProject\.venv\Scripts\pip.exe install --no-deps file:///C:/Users/User/AppData/Local/pypoetry/Cache/artifacts/1b/09/43/f8f36d57c7cc6f6a038e649e082fa3ea231c686664e203db89b869ada7/atomicwri
tes-1.4.1.tar.gz errored with the following return code 1, and output:
  Processing c:\users\user\appdata\local\pypoetry\cache\artifacts\1b\09\43\f8f36d57c7cc6f6a038e649e082fa3ea231c686664e203db89b869ada7\atomicwrites-1.4.1.tar.gz
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'done'
  ERROR: No .egg-info directory found in C:\Users\User\AppData\Local\Temp\pip-pip-egg-info-_5pto6b7


  at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\utils\env.py:1195 in _run
      1191│                 output = subprocess.check_output(
      1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1193│                 )
      1194│         except CalledProcessError as e:
    → 1195│             raise EnvCommandError(e, input=input_)
      1196│
      1197│         return decode(output)
      1198│
      1199│     def execute(self, bin, *args, **kwargs):

ERROR: No .egg-info directory found in C:\Users\User\AppData\Local\Temp\pip-pip-egg-info-n_f6amnr

The bold text in the above error is getting changed everytime I am receiving this error.

I tried to google the solutions, what I found I already applied them but still its throwing me similar error with different dependencies which I`m not even using in my project.

Solution that I found:-

Few more somehow similar topics though not exactly what I`m facing:

If anyone from the community could support would be very helpful for me.

Lakshay Rohilla
  • 1,654
  • 6
  • 9
  • 30

1 Answers1

0

Seems like I was facing this issue in the latest version of poetry.
I downgraded it to 1.1.13.
And its working fine now.

Commands that I used:-

  1. To uninstall poetry : curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --uninstall
    NOTE: If it complain for python, provide path where you have python installed instead of python3 in the command.
  2. Reinstalled it : (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -

For more refer official docs.

Thank you.

Lakshay Rohilla
  • 1,654
  • 6
  • 9
  • 30