Poetry hangs when installing torch
I'm trying to add pytorch_pretrained_bert package, but it hangs on downloading torch. I've been waiting for almost 30 mins already. I'm running this command: poetry add pytorch_pretrained_bert -vvv and the output is as such:
PS C:\Users\aaaa\Desktop\AI\nexus\ocr&gt; poetry add pytorch_pretrained_bert -vvv
Using virtualenv: C:\Users\aaaa\AppData\Local\pypoetry\Cache\virtualenvs\ocr-MxNkBiZL-py3.8
PyPI: 10 packages found for pytorch-pretrained-bert *
Using version ^0.6.2 for pytorch-pretrained-bert

Updating dependencies
Resolving dependencies...
   1: fact: ocr is 0.1.0
   1: derived: ocr
   1: fact: ocr depends on click (^8.0.1)
   1: fact: ocr depends on pytesseract (^0.3.8)
   1: fact: ocr depends on opencv-contrib-python (^4.5.2)
   1: fact: ocr depends on numpy (^1.21.0)
   1: fact: ocr depends on pdf2image (^1.16.0)
   1: fact: ocr depends on poppler-utils (^0.1.0)
   1: fact: ocr depends on deskew (^0.10.30)
   1: fact: ocr depends on pytorch-pretrained-bert (^0.6.2)
   1: fact: ocr depends on pytest (^5.2)
   1: fact: ocr depends on pytest (^5.2)
   1: selecting ocr (0.1.0)
   1: derived: pytest (&gt;=5.2,&lt;6.0)
   1: derived: pytorch-pretrained-bert (&gt;=0.6.2,&lt;0.7.0)
   1: derived: deskew (&gt;=0.10.30,&lt;0.11.0)
   1: derived: poppler-utils (&gt;=0.1.0,&lt;0.2.0)
   1: derived: pdf2image (&gt;=1.16.0,&lt;2.0.0)
   1: derived: numpy (&gt;=1.21.0,&lt;2.0.0)
   1: derived: opencv-contrib-python (&gt;=4.5.2,&lt;5.0.0)
   1: derived: pytesseract (&gt;=0.3.8,&lt;0.4.0)
   1: derived: click (&gt;=8.0.1,&lt;9.0.0)
   1: fact: pytest (5.4.3) depends on py (&gt;=1.5.0)
   1: fact: pytest (5.4.3) depends on packaging (*)
   1: fact: pytest (5.4.3) depends on attrs (&gt;=17.4.0)
   1: fact: pytest (5.4.3) depends on more-itertools (&gt;=4.0.0)
   1: fact: pytest (5.4.3) depends on pluggy (&gt;=0.12,&lt;1.0)
   1: fact: pytest (5.4.3) depends on wcwidth (*)
   1: fact: pytest (5.4.3) depends on atomicwrites (&gt;=1.0)
   1: fact: pytest (5.4.3) depends on colorama (*)
   1: selecting pytest (5.4.3)
   1: derived: colorama
   1: derived: atomicwrites (&gt;=1.0)
   1: derived: wcwidth
   1: derived: pluggy (&gt;=0.12,&lt;1.0)
   1: derived: more-itertools (&gt;=4.0.0)
   1: derived: attrs (&gt;=17.4.0)
   1: derived: packaging
   1: derived: py (&gt;=1.5.0)
PyPI: 1 packages found for pytorch-pretrained-bert &gt;=0.6.2,&lt;0.7.0
   1: fact: pytorch-pretrained-bert (0.6.2) depends on torch (&gt;=0.4.1)
   1: fact: pytorch-pretrained-bert (0.6.2) depends on numpy (*)
   1: fact: pytorch-pretrained-bert (0.6.2) depends on boto3 (*)
   1: fact: pytorch-pretrained-bert (0.6.2) depends on requests (*)
   1: fact: pytorch-pretrained-bert (0.6.2) depends on tqdm (*)
   1: fact: pytorch-pretrained-bert (0.6.2) depends on regex (*)
   1: selecting pytorch-pretrained-bert (0.6.2)
   1: derived: regex
   1: derived: tqdm
   1: derived: requests
   1: derived: boto3
   1: derived: torch (&gt;=0.4.1)
   1: fact: deskew (0.10.30) depends on numpy (*)
   1: fact: deskew (0.10.30) depends on scikit-image (!=0.15.0)
   1: selecting deskew (0.10.30)
   1: derived: scikit-image (!=0.15.0)
   1: fact: poppler-utils (0.1.0) depends on Click (&gt;=7.0)
   1: selecting poppler-utils (0.1.0)
   1: fact: pdf2image (1.16.0) depends on pillow (*)
   1: selecting pdf2image (1.16.0)
   1: derived: pillow
   1: selecting numpy (1.21.0)
   1: fact: opencv-contrib-python (4.5.2.54) depends on numpy (&gt;=1.13.3)
   1: selecting opencv-contrib-python (4.5.2.54)
   1: fact: pytesseract (0.3.8) depends on Pillow (*)
   1: selecting pytesseract (0.3.8)
   1: fact: click (8.0.1) depends on colorama (*)
   1: selecting click (8.0.1)
   1: selecting wcwidth (0.2.5)
   1: selecting pluggy (0.13.1)
   1: selecting more-itertools (8.8.0)
   1: selecting attrs (21.2.0)
   1: fact: packaging (21.0) depends on pyparsing (&gt;=2.0.2)
   1: selecting packaging (21.0)
   1: derived: pyparsing (&gt;=2.0.2)
   1: selecting py (1.10.0)
   1: selecting regex (2021.7.6)
   1: fact: tqdm (4.61.2) depends on colorama (*)
   1: selecting tqdm (4.61.2)
   1: fact: requests (2.25.1) depends on chardet (&gt;=3.0.2,&lt;5)
   1: fact: requests (2.25.1) depends on idna (&gt;=2.5,&lt;3)
   1: fact: requests (2.25.1) depends on urllib3 (&gt;=1.21.1,&lt;1.27)
   1: fact: requests (2.25.1) depends on certifi (&gt;=2017.4.17)
   1: selecting requests (2.25.1)
   1: derived: certifi (&gt;=2017.4.17)
   1: derived: urllib3 (&gt;=1.21.1,&lt;1.27)
   1: derived: idna (&gt;=2.5,&lt;3)
   1: derived: chardet (&gt;=3.0.2,&lt;5)
   1: fact: boto3 (1.17.105) depends on botocore (&gt;=1.20.105,&lt;1.21.0)
   1: fact: boto3 (1.17.105) depends on jmespath (&gt;=0.7.1,&lt;1.0.0)
   1: fact: boto3 (1.17.105) depends on s3transfer (&gt;=0.4.0,&lt;0.5.0)
   1: selecting boto3 (1.17.105)
   1: derived: s3transfer (&gt;=0.4.0,&lt;0.5.0)
   1: derived: jmespath (&gt;=0.7.1,&lt;1.0.0)
   1: derived: botocore (&gt;=1.20.105,&lt;1.21.0)
   1: fact: torch (1.9.0) depends on typing-extensions (*)
   1: selecting torch (1.9.0)
   1: derived: typing-extensions
   1: fact: scikit-image (0.18.2) depends on numpy (&gt;=1.16.5)
   1: fact: scikit-image (0.18.2) depends on scipy (&gt;=1.0.1)
   1: fact: scikit-image (0.18.2) depends on matplotlib (&gt;=2.0.0,&lt;3.0.0 || &gt;3.0.0)
   1: fact: scikit-image (0.18.2) depends on networkx (&gt;=2.0)
   1: fact: scikit-image (0.18.2) depends on pillow (&gt;=4.3.0,&lt;7.1.0 || &gt;7.1.0,&lt;7.1.1 || &gt;7.1.1)
   1: fact: scikit-image (0.18.2) depends on imageio (&gt;=2.3.0)
   1: fact: scikit-image (0.18.2) depends on tifffile (&gt;=2019.7.26)
   1: fact: scikit-image (0.18.2) depends on PyWavelets (&gt;=1.1.1)
   1: selecting scikit-image (0.18.2)
   1: derived: PyWavelets (&gt;=1.1.1)
   1: derived: tifffile (&gt;=2019.7.26)
   1: derived: imageio (&gt;=2.3.0)
   1: derived: pillow (&gt;=4.3.0,!=7.1.0,!=7.1.1)
   1: derived: networkx (&gt;=2.0)
   1: derived: matplotlib (&gt;=2.0.0,!=3.0.0)
   1: derived: scipy (&gt;=1.0.1)
   1: selecting pillow (8.3.0)
   1: selecting pyparsing (2.4.7)
   1: selecting certifi (2021.5.30)
   1: selecting urllib3 (1.26.6)
   1: selecting idna (2.10)
   1: selecting chardet (4.0.0)
   1: fact: s3transfer (0.4.2) depends on botocore (&gt;=1.12.36,&lt;2.0a.0)
   1: selecting s3transfer (0.4.2)
   1: selecting jmespath (0.10.0)
   1: fact: botocore (1.20.105) depends on jmespath (&gt;=0.7.1,&lt;1.0.0)
   1: fact: botocore (1.20.105) depends on python-dateutil (&gt;=2.1,&lt;3.0.0)
   1: fact: botocore (1.20.105) depends on urllib3 (&gt;=1.25.4,&lt;1.27)
   1: selecting botocore (1.20.105)
   1: derived: python-dateutil (&gt;=2.1,&lt;3.0.0)
   1: selecting typing-extensions (3.10.0.0)
   1: fact: pywavelets (1.1.1) depends on numpy (&gt;=1.13.3)
   1: selecting pywavelets (1.1.1)
   1: fact: tifffile (2021.7.2) depends on numpy (&gt;=1.15.1)
   1: selecting tifffile (2021.7.2)
   1: fact: imageio (2.9.0) depends on numpy (*)
   1: fact: imageio (2.9.0) depends on pillow (*)
   1: selecting imageio (2.9.0)
   1: fact: networkx (2.5.1) depends on decorator (&gt;=4.3,&lt;5)
   1: selecting networkx (2.5.1)
   1: derived: decorator (&gt;=4.3,&lt;5)
   1: fact: matplotlib (3.4.2) depends on cycler (&gt;=0.10)
   1: fact: matplotlib (3.4.2) depends on kiwisolver (&gt;=1.0.1)
   1: fact: matplotlib (3.4.2) depends on numpy (&gt;=1.16)
   1: fact: matplotlib (3.4.2) depends on pillow (&gt;=6.2.0)
   1: fact: matplotlib (3.4.2) depends on pyparsing (&gt;=2.2.1)
   1: fact: matplotlib (3.4.2) depends on python-dateutil (&gt;=2.7)
   1: selecting matplotlib (3.4.2)
   1: derived: python-dateutil (&gt;=2.7)
   1: derived: kiwisolver (&gt;=1.0.1)
   1: derived: cycler (&gt;=0.10)
   1: fact: scipy (1.6.1) depends on numpy (&gt;=1.16.5)
   1: selecting scipy (1.6.1)
   1: fact: python-dateutil (2.8.1) depends on six (&gt;=1.5)
   1: selecting python-dateutil (2.8.1)
   1: derived: six (&gt;=1.5)
   1: selecting decorator (4.4.2)
   1: selecting kiwisolver (1.3.1)
   1: fact: cycler (0.10.0) depends on six (*)
   1: selecting cycler (0.10.0)
   1: selecting six (1.16.0)
   1: selecting colorama (0.4.4)
   1: selecting atomicwrites (1.4.0)
   1: Version solving took 0.246 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system

Package operations: 2 installs, 0 updates, 0 removals, 42 skipped

  • Installing six (1.16.0): Skipped for the following reason: Already installed
  • Installing jmespath (0.10.0): Skipped for the following reason: Already installed
  • Installing python-dateutil (2.8.1): Skipped for the following reason: Already installed
  • Installing urllib3 (1.26.6): Skipped for the following reason: Already installed
  • Installing botocore (1.20.105): Skipped for the following reason: Already installed
  • Installing cycler (0.10.0): Skipped for the following reason: Already installed
  • Installing kiwisolver (1.3.1): Skipped for the following reason: Already installed
  • Installing pillow (8.3.0): Skipped for the following reason: Already installed
  • Installing decorator (4.4.2): Skipped for the following reason: Already installed
  • Installing numpy (1.21.0): Skipped for the following reason: Already installed
  • Installing pyparsing (2.4.7): Skipped for the following reason: Already installed
  • Installing certifi (2021.5.30): Skipped for the following reason: Already installed
  • Installing chardet (4.0.0): Skipped for the following reason: Already installed
  • Installing imageio (2.9.0): Skipped for the following reason: Already installed
  • Installing networkx (2.5.1): Skipped for the following reason: Already installed
  • Installing colorama (0.4.4): Skipped for the following reason: Already installed
  • Installing scipy (1.6.1): Skipped for the following reason: Already installed
  • Installing pywavelets (1.1.1): Skipped for the following reason: Already installed
  • Installing matplotlib (3.4.2): Skipped for the following reason: Already installed
  • Installing tifffile (2021.7.2): Skipped for the following reason: Already installed
  • Installing typing-extensions (3.10.0.0): Skipped for the following reason: Already installed
  • Installing s3transfer (0.4.2): Skipped for the following reason: Already installed
  • Installing idna (2.10): Skipped for the following reason: Already installed
  • Installing atomicwrites (1.4.0): Skipped for the following reason: Already installed
  • Installing attrs (21.2.0): Skipped for the following reason: Already installed
  • Installing click (8.0.1): Skipped for the following reason: Already installed
  • Installing packaging (21.0): Skipped for the following reason: Already installed
  • Installing more-itertools (8.8.0): Skipped for the following reason: Already installed
  • Installing boto3 (1.17.105): Skipped for the following reason: Already installed
  • Installing py (1.10.0): Skipped for the following reason: Already installed
  • Installing requests (2.25.1): Skipped for the following reason: Already installed
  • Installing scikit-image (0.18.2): Skipped for the following reason: Already installed
  • Installing wcwidth (0.2.5): Skipped for the following reason: Already installed
  • Installing tqdm (4.61.2): Skipped for the following reason: Already installed
  • Installing torch (1.9.0)
  • Installing pluggy (0.13.1): Skipped for the following reason: Already installed
  • Installing regex (2021.7.6): Skipped for the following reason: Already installed

As you can see installation had not finished. What could be a reason? I'm using Windows 10 operating system and running the command in Windows PowerShell.

TL;DR: This is easily verified by either a green colored version number and dot as shown in this screenshot or running poetry run &lt;package&gt; --version and having successful output.
Short Answer
When I've installed packages with Poetry, I've seen some packages, like pylint, only display the line
Installing pylint (2.11.1)

and appear to never complete. But if I run
poetry run pylint --version

it'll print out the installed version within the poetry venv:
pylint 2.11.1
astroid 2.8.3
Python 3.9.7 (default, Sep 3 2021, ...)

Longer Answer
Not sure if this is a recent change with Poetry, but currently using the preview version of Poetry, 1.2.0a2, the output after running poetry add &lt;package&gt; -vvv looks something like this to indicate separately resolving dependencies and install progress:
$ poetry add pylint -vvv
Loading configuration file ...
Using virtualenv: ...
PyPI: 1 packages found for pylint

Updating dependencies
Resolving dependencies...
   1: fact: pylint (2.11.1) depends on platformdirs (&gt;=2.2.0)
   1: fact: pylint (2.11.1) depends on astroid (&gt;=2.8.0,&lt;2.9)
   1: fact: pylint (2.11.1) depends on isort (&gt;=4.2.5,&lt;6)
   1: fact: pylint (2.11.1) depends on mccabe (&gt;=0.6,&lt;0.7)
   1: fact: pylint (2.11.1) depends on toml (&gt;=0.7.1)
   1: fact: pylint (2.11.1) depends on typing-extensions (&gt;=3.10.0)
   1: fact: pylint (2.11.1) depends on colorama (*)
   1: selecting pylint (2.11.1)
   1: derived: typing-extensions (&gt;=3.10.0)
   1: derived: toml (&gt;=0.7.1)
   1: derived: mccabe (&gt;=0.6,&lt;0.7)
   1: derived: isort (&gt;=4.2.5,&lt;6)
   1: derived: astroid (&gt;=2.8.0,&lt;2.9)
   1: derived: platformdirs (&gt;=2.2.0)
PyPI: 1 packages found for pylint
...

Writing lock file

Finding the necessary packages for the current system

Package operations: 6 installs, 0 updates, 0 removals, 0 skipped

  • Installing pylint (2.11.1): Pending...
  • Installing pytest (2.11.1): Installing...
  • Installing pytest (2.11.1)  # dot and version will be green to indicate package was installed

Note that the output will initially start as Pending... and may update the line in place to Downloading X% and then Installing... or output on new lines. So if you see a line by itself, it is possible the package has been installed. This is easily verified by either a green colored version number and dot as shown in this screenshot or running poetry run &lt;package&gt; --version and having successful output.
Hopefully, this extra output will clarify the install state of the package(s) you were installing.
