Poetry: Poetry Does Not Handle Spaces in Path for Wheel Install

Created on 20 Aug 2020  Â·  1Comment  Â·  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 10, version 1809
  • Poetry version: 1.1.0b2
    Link of a Gist with the contents of your yproject.toml file: N/A

Issue

Attempting to install bpython on Windows from wheel yields the following error:

(.venv) PS C:\Users\example\My Folder\Code\project> poetry add --dev .\curses-2.2.1+utf8-cp37-cp37m-win_amd64.whl

Updating dependencies
Resolving dependencies...
PackageInfo: Invalid constraint (six (~=1.12)) found in astroid-2.4.2 dependencies, skipping
PackageInfo: Invalid constraint (wrapt (~=1.11)) found in astroid-2.4.2 dependencies, skipping

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing curses (2.2.1+utf8 curses-2.2.1+utf8-cp37-cp37m-win_amd64.whl)

  EnvCommandError

  Command "C:\Users\example\My Folder\Code\project\.venv\Scripts\pip.exe" install --no-deps C:\Users\example\My Folder\Code\project\curses-2.2.1+utf8-cp37-cp37m-win_amd64.whl errored with the following return code 1, and output:
  Invalid requirement: 'C:\Users\example\My'
  It looks like a path. File 'C:\Users\example\My' does not exist.
  You are using pip version 10.0.1, however version 20.2.2 is available.
  You should consider upgrading via the 'python -m pip install --upgrade pip' command.


  at c:\users\example\appdata\local\programs\python\python37\lib\site-packages\poetry\utils\env.py:944 in _run
       940│                 output = subprocess.check_output(
       941│                     cmd, stderr=subprocess.STDOUT, **kwargs
       942│                 )
       943│         except CalledProcessError as e:
    →  944│             raise EnvCommandError(e, input=input_)
       945│
       946│         return decode(output)
       947│
       948│     def execute(self, bin, *args, **kwargs):


Failed to add packages, reverting the pyproject.toml file to its original content.
Bug

>All comments

This appears to be a problem with the binary downloaded from Christoph Gohlke's site (https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses). Note, this is a Windows issue only. To solve, do the following:

poetry add windows-curses
poetry add bpython

then run

bpython-curses

from the terminal. Please close this issue as solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

etijskens picture etijskens  Â·  3Comments

thmo picture thmo  Â·  3Comments

alexlatchford picture alexlatchford  Â·  3Comments

ambv picture ambv  Â·  3Comments

jhrmnn picture jhrmnn  Â·  3Comments