title: How to properly setup poetry environment with python?
body: <p>This is my first time setting up poetry. My project structure looks like this:</p>
  <pre><code>bert-api
      bert_api
          bert
              __init__.py
              predict.py
          data
              docs
      tests
      venv
      poetry.lock
      pyproject.toml
  </code></pre>
  <p>I created my poetry using following command:</p>
  <pre><code>curl -sSL https://raw.githubusercontent.com/python
  
  #change python version
  alias python='/usr/local/bin/python3.6'
  python --version
  
  #start a new project
  poetry new bert-api
  
  #open the project
  poetry install
  poetry shell
  
  poetry env use /usr/local/bin/python3.6
  </code></pre>
  <p>now to run <em>predict.py</em> i go:</p>
  <pre><code> (venv) (base) a10.12@MacBook-Air bert-api % poetry install
   (venv) (base) a10.12@MacBook-Air bert-api % poetry run script
  </code></pre>
  <p>and it works perfectly:</p>
  <p>However as far as I know I suppose to use</p>
  <pre><code>poetry install
  poetry shell
  
  Spawning shell within /Users/a10.12/Library/Caches/pypoetry/virtualenvs/bert-api-w7KuvcmX-py3.6
  a10.12@MacBook-Air bert-api % . /Users/a10.12/Library/Caches/pypoetry/virtualenvs/bert-api-w7KuvcmX-py3.6/bin/activate
  </code></pre>
  <p>and then run</p>
  <pre><code>poetry run script
  </code></pre>
  <p>but if I do this way I get an error:</p>
  <pre><code>ImportError: cannot import name 'VersionConstraint'
  </code></pre>
  <p>What am I doing wrong?</p>
  <p>My pyproject.toml</p>
  <pre><code>[tool.poetry]
  name = &quot;bert-api&quot;
  version = &quot;0.1.0&quot;
  description = &quot;&quot;
  authors = [name]
  
  [tool.poetry.dependencies]
  python = &quot;^3.6.7&quot;
  deeppavlov = &quot;^0.15.0&quot;
  
  [tool.poetry.scripts]
  script = &quot;bert_api.bert.predict:main&quot;
  
  [tool.poetry.dev-dependencies]
  pytest = &quot;^5.2&quot;
  
  [build-system]
  requires = [&quot;poetry-core&gt;=1.0.0&quot;]
  build-backend = &quot;poetry.core.masonry.api
  </code></pre>
  <p>&quot;</p>