samredai commented on code in PR #4650:
URL: https://github.com/apache/iceberg/pull/4650#discussion_r860298644


##########
python/README.md:
##########
@@ -35,9 +35,22 @@ pip install -e .
 Testing is done using tox. The config can be found in `tox.ini` within the 
python directory of the iceberg project.
 
 ```
-# simply run tox within the python dir
 tox
 ```
 
+## Solution for `InterpreterNotFound` Errors
+
+Currently, tests run against python `3.7.12`, `3.8.12`, and `3.9.10`. It's 
recommended to install and manage multiple interpreters using 
[pyenv](https://github.com/pyenv/pyenv).
+```
+pyenv install 3.7.12
+pyenv install 3.8.12
+pyenv install 3.9.10

Review Comment:
   Agreed. It would definitely be safe to just install the latest patch version 
but unfortunately pyenv doesn't allow excluding it such as `3.8` or `3.8.*`. 
They explain some of the rationale in 
[this](https://github.com/pyenv/pyenv/issues/1946#issuecomment-847735677) issue.
   
   One bug (I think?) in pyenv is that if you have multiple versions inside the 
`python-version` file, it doesn't know how to pick them all up when you run the 
shorthand `pyenv install` command. It's interesting though because pyenv 
creates that file on its own.
   
   To be clear about what I mean, if you run `pyenv local 3.9.10` it will 
create a `.python-version` file that looks like this:
   ```
   3.9.10
   ```
   and then someone else can come along and just run `pyenv install` in that 
directory and it will install `3.9.10`.
   
   However, if you do `pyenv local 3.7.12 3.8.12 3.9.10`, it creates a 
`.python-version` file that looks like ours:
   ```
   3.7.12
   3.8.12
   3.9.10
   ```
   but running `pyenv install` doesn't work:
   ```sh
   $ pyenv install
   python-build: definition not found: 3.7.12
   3.8.12
   3.9.10
   
   The following versions contain `3.7.12
   3.8.12
   3.9.10' in the name:
     3.7.12
     3.8.12
     3.9.10
   
   See all available versions with `pyenv install --list'.
   
   If the version you need is missing, try upgrading pyenv:
   
     brew update && brew upgrade pyenv
   ```
   
   If it's a simple fix in 
[pyenv-install](https://github.com/pyenv/pyenv/blob/master/plugins/python-build/bin/pyenv-install)
 to get it to iterate and install each version, then it might be worth trying a 
PR there.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to