You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/19 18:52:11 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #4818: Python: Fix issue related to Pyenchant with executing linters on Apple Silicons

Fokko commented on code in PR #4818:
URL: https://github.com/apache/iceberg/pull/4818#discussion_r877419251


##########
python/README.md:
##########
@@ -52,5 +52,21 @@ Once all three versions are installed, you can set an application-specific pyenv
 pyenv local 3.7.12 3.8.12 3.9.10
 ```
 
+## Pyenchant linter errors on Apple Silicons
+
+If you are using an M1 Mac to run tox, there is currently [an issue with pyenchant](https://github.com/pyenchant/pyenchant/issues/265) that you would run into while running `linters`. 
+This happens because python distributions installed by `pyenv` are in the default M1 architecture (aarch64), and can't find a compatible enchant library.  
+As a workaround, you can follow the below steps. 
+
+Install enchant with Homebrew 
+```shell
+brew install enchant
+```
+Set environment variable `PYENCHANT_LIBRARY_PATH` to point to the installed enchant library before running `tox`.
+```shell
+export PYENCHANT_LIBRARY_PATH = /opt/homebrew/lib/libenchant-2.dylib
+```
+You can set this environment variable in your `~/.zshrc` or in your IDE to avoid doing it everytime.
+

Review Comment:
   We could add the snippet:
   ```bash
   echo 'export PYENCHANT_LIBRARY_PATH="/opt/homebrew/lib/libenchant-2.dylib"' >> ~/.zshrc
   ```
   
   



##########
python/README.md:
##########
@@ -52,5 +52,21 @@ Once all three versions are installed, you can set an application-specific pyenv
 pyenv local 3.7.12 3.8.12 3.9.10
 ```
 
+## Pyenchant linter errors on Apple Silicons
+
+If you are using an M1 Mac to run tox, there is currently [an issue with pyenchant](https://github.com/pyenchant/pyenchant/issues/265) that you would run into while running `linters`. 
+This happens because python distributions installed by `pyenv` are in the default M1 architecture (aarch64), and can't find a compatible enchant library.  
+As a workaround, you can follow the below steps. 
+
+Install enchant with Homebrew 
+```shell
+brew install enchant
+```
+Set environment variable `PYENCHANT_LIBRARY_PATH` to point to the installed enchant library before running `tox`.
+```shell
+export PYENCHANT_LIBRARY_PATH = /opt/homebrew/lib/libenchant-2.dylib

Review Comment:
   ```suggestion
   export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib
   ```



##########
python/README.md:
##########
@@ -52,5 +52,21 @@ Once all three versions are installed, you can set an application-specific pyenv
 pyenv local 3.7.12 3.8.12 3.9.10
 ```
 
+## Pyenchant linter errors on Apple Silicons
+
+If you are using an M1 Mac to run tox, there is currently [an issue with pyenchant](https://github.com/pyenchant/pyenchant/issues/265) that you would run into while running `linters`. 
+This happens because python distributions installed by `pyenv` are in the default M1 architecture (aarch64), and can't find a compatible enchant library.  
+As a workaround, you can follow the below steps. 

Review Comment:
   ```suggestion
   As a workaround, you can follow the steps below:
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org