OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

[Bug] CalledProcessError when running `poetry install` on Windows 10

Open dharmatech opened this issue 3 years ago • 1 comments

Describe the bug

Running into errors during poetry install on Windows.

To Reproduce

Run poetry install.

Desktop (please complete the following information):

  • OS: Windows 10
  • Python version 3.9.13

Additional context

(obb) PS C:\Users\dharm\OpenBBTerminal> poetry install
Installing dependencies from lock file

Package operations: 279 installs, 20 updates, 3 removals

  • Removing lightgbm (3.3.3)
  • Removing pywin32-ctypes (0.2.0)
  • Removing wheel (0.38.4)
  • Updating attrs (22.2.0 -> 21.4.0)
  • Updating platformdirs (2.6.2 -> 3.0.0)
  • Updating pyrsistent (0.19.3 -> 0.18.1): Failed

  CalledProcessError

  Command 'C:\Users\dharm\miniconda3\envs\obb\python.exe -m pip install --disable-pip-version-check --isolated --no-input --prefix C:\Users\dharm\miniconda3\envs\obb --upgrade --no-deps C:\Users\dharm\AppData\Local\pypoetry\Cache\artifacts\a8\a0\90\feff5541a3ee6cc5dd96709e418499d1f6fe2f51327ae5580e54cbc1c3\pyrsistent-0.18.1-cp39-cp39-win_amd64.whl' returned non-zero exit status 1.

  at ~\miniconda3\envs\obb\lib\subprocess.py:528 in run
       524│             # We don't call process.wait() as .__exit__ does that for us.
       525│             raise
       526│         retcode = process.poll()
       527│         if check and retcode:
    →  528│             raise CalledProcessError(retcode, process.args,
       529│                                      output=stdout, stderr=stderr)
       530│     return CompletedProcess(process.args, retcode, stdout, stderr)
       531│
       532│

The following error occurred when trying to handle this error:


  EnvCommandError

  Command C:\Users\dharm\miniconda3\envs\obb\python.exe -m pip install --disable-pip-version-check --isolated --no-input --prefix C:\Users\dharm\miniconda3\envs\obb --upgrade --no-deps C:\Users\dharm\AppData\Local\pypoetry\Cache\artifacts\a8\a0\90\feff5541a3ee6cc5dd96709e418499d1f6fe2f51327ae5580e54cbc1c3\pyrsistent-0.18.1-cp39-cp39-win_amd64.whl errored with the following return code 1, and output:
  Processing c:\users\dharm\appdata\local\pypoetry\cache\artifacts\a8\a0\90\feff5541a3ee6cc5dd96709e418499d1f6fe2f51327ae5580e54cbc1c3\pyrsistent-0.18.1-cp39-cp39-win_amd64.whl
  Installing collected packages: pyrsistent
    Attempting uninstall: pyrsistent
      Found existing installation: pyrsistent 0.19.3
      Uninstalling pyrsistent-0.19.3:
        Successfully uninstalled pyrsistent-0.19.3
  ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\dharm\\AppData\\Local\\Temp\\pip-uninstall-p17h5f11\\pvectorc.cp39-win_amd64.pyd'
  Consider using the `--user` option or check the permissions.



  at ~\miniconda3\envs\obb\lib\site-packages\poetry\utils\env.py:1540 in _run
      1536│                 output = subprocess.check_output(
      1537│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1538│                 )
      1539│         except CalledProcessError as e:
    → 1540│             raise EnvCommandError(e, input=input_)
      1541│
      1542│         return decode(output)
      1543│
      1544│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  PoetryException

  Failed to install C:/Users/dharm/AppData/Local/pypoetry/Cache/artifacts/a8/a0/90/feff5541a3ee6cc5dd96709e418499d1f6fe2f51327ae5580e54cbc1c3/pyrsistent-0.18.1-cp39-cp39-win_amd64.whl

  at ~\miniconda3\envs\obb\lib\site-packages\poetry\utils\pip.py:58 in pip_install
       54│
       55│     try:
       56│         return environment.run_pip(*args)
       57│     except EnvCommandError as e:
    →  58│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       59│

  • Installing pywin32 (305)
  • Updating setuptools (67.4.0 -> 64.0.2)
  • Installing traitlets (5.9.0)

dharmatech avatar Feb 26 '23 08:02 dharmatech

Are you having this issue still? We recently updated our installation process for source, so if you still have issues from that, please let us know!

jmaslek avatar Apr 18 '23 18:04 jmaslek

Try running poetry install -E all instead of poetry install.

If that doesn't work, try to follow all the steps for installation from source in their website, It worked perfectly for me.

MelikBelkhiria avatar May 12 '23 15:05 MelikBelkhiria

try poetry install -E all , if it doesn't work try pip install -e Keep in mind that if you have packages that you want to install in editable mode but don't want to use Poetry since you have a problem, you can navigate to each package's directory and run pip install -e . This will install the package in editable mode directly using pip.

DyNour avatar May 14 '23 21:05 DyNour

Hey y'all!

I'm running into a separate issue now during installation. This is on a new Windows installation. Details here:

https://github.com/OpenBB-finance/OpenBBTerminal/issues/5052

dharmatech avatar May 20 '23 07:05 dharmatech