title: Finding right version of python/sklearn in to use machine learning model in pyenv
body: <p>I pickled a model on Kaggle and tried to download it to run locally. Using poetry and pyenv I ran the following commands to create a project:</p>
  <pre><code>pyenv local 3.6.6    
  poetry new model_api
  cd model_test
  poetry env use python
  poetry add &quot;sklearn&gt;=0.21.3&quot;
  </code></pre>
  <p>but received the error below.</p>
  <p><a href="https://i.stack.imgur.com/Ez3SE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ez3SE.png" alt="enter image description here" /></a></p>
  <p>If I simply use sklearn and install it with poetry I get this error when executing my code in VS Code.</p>
  <pre><code>/bin/python /home/gary/Documents/model_api/model_api/app.py
  Traceback (most recent call last):
    File &quot;/home/gary/Documents/model_api/model_api/app.py&quot;, line 5, in &lt;module&gt;
      model = pickle.load(f)
  ModuleNotFoundError: No module named 'sklearn.ensemble.forest'
  </code></pre>
  <p>This is the code I am attempting to run.</p>
  <pre><code>import sklearn 
  import pickle
  
  f = open('./model/ForestModel','rb')
  model = pickle.load(f)
  </code></pre>
  <p>I'm trying to use Python 3.6.6 and sklearn 0.21.3 based on what I'm seeing on Kaggle:
  <a href="https://i.stack.imgur.com/iCZ4f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iCZ4f.png" alt="enter image description here" /></a></p>
  <p>If I try to use a more current version of Python like 3.8.10 I get the same error. I think I'm missing something simple/obvious. Any pointers or things I could check would be greatly appreciated.</p>