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:44:28 UTC

[GitHub] [iceberg] dhruv-pratap opened a new pull request, #4818: Python: Fix issue related to Pyenchant with executing linters on Apple Silicons

dhruv-pratap opened a new pull request, #4818:
URL: https://github.com/apache/iceberg/pull/4818

   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.


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
samredai commented on PR #4818:
URL: https://github.com/apache/iceberg/pull/4818#issuecomment-1143978116

   Looks like we need to resolve this conflict now that tox has been replace by pre-commit. @Fokko is there a way to pass the `PYENCHANT_LIBRARY_PATH` to the venv? Would this be done in the Poetry config?


-- 
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


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

Posted by GitBox <gi...@apache.org>.
rdblue commented on PR #4818:
URL: https://github.com/apache/iceberg/pull/4818#issuecomment-1168940096

   I'm going to close this since it is documentation for tox, but we've switched to using pre-commit and poetry. Thanks, @dhruv-pratap!


-- 
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


[GitHub] [iceberg] rdblue closed pull request #4818: Python: Fix issue related to Pyenchant with executing linters on Apple Silicons

Posted by GitBox <gi...@apache.org>.
rdblue closed pull request #4818: Python: Fix issue related to Pyenchant with executing linters on Apple Silicons
URL: https://github.com/apache/iceberg/pull/4818


-- 
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


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

Posted by GitBox <gi...@apache.org>.
samredai commented on PR #4818:
URL: https://github.com/apache/iceberg/pull/4818#issuecomment-1132085365

   > riable.
   > 
   > @samredai are you on M1 as well?
   
   I actually was using an intel macbook when we fixed this (my primary workstation 😄 ). I do have an M1 so I'll try this out there to confirm I get the same issue and I'll try the solution described in this PR.


-- 
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


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

Posted by GitBox <gi...@apache.org>.
dhruv-pratap commented on code in PR #4818:
URL: https://github.com/apache/iceberg/pull/4818#discussion_r877462127


##########
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:
   Added.



-- 
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


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

Posted by GitBox <gi...@apache.org>.
kbendick commented on PR #4818:
URL: https://github.com/apache/iceberg/pull/4818#issuecomment-1132169478

   I have an M1 macbook as well, so I can test this out too. I am still using my Intel macbook as my primary computer while working on migrating to the M1 machine, 


-- 
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