-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention that users need to install Pyenchant dictionaries when using the Pylint spell checking options #368
Comments
Hey @GadgetSteve, thanks for reporting. You said:
So, did you connect your venv (the one where you installed pyenchant) to Spyder following these instructions? http://docs.spyder-ide.org/current/faq.html#using-existing-environment |
Hi Carlos,
I did not – I was following the instructions at https://docs.spyder-ide.org/current/installation.html#using-pip then running Spyder connected to the installation environment.
Important to note:
* I was in a work environment so:
* Behind a firewall
* Would need a lengthy (in weeks) approval process before being able to use the standalone installer ☹
* Forbidden to use Anaconda 😐
* With access to a regularly updated PyPi mirror 😊
The thing for me was that Spyder reported that if couldn’t find the dictionary out of “” rather than it couldn’t load enchant. The ipython shell correctly reported that if couldn’t `import enchant`- so I was able to get things working by using `%pip instll -U pyenchant` - I could of course have switched to the venv and done the install there.
This suggests possible alternatives to resolve:
1. Tweaking the dependencies for Spyder so that pyenchant gets installed with its default dictionaries
2. Intercepting the error message so as to tell the user that they need to pip install pyenchant in the current environment
3. Adding pyenchant to the pip lines in the instructions
4. Adding a note to the install instructions
Of these I personally would prefer 1 or 3 (with 3 not requiring a new release of spyder).
All the best,
Steve
From: Carlos Cordoba ***@***.***>
Sent: Thursday, May 2, 2024 1:00 AM
To: spyder-ide/spyder ***@***.***>
Cc: Steve (Gadget) Barnes ***@***.***>; Mention ***@***.***>
Subject: Re: [spyder-ide/spyder] Missing Spelling Dicts (Issue spyder-ide/spyder-docs#368)
Hey @GadgetSteve<https://github.com/GadgetSteve>, thanks for reporting. You said:
Invstigating in the IPython console tried import enchant got no module.
So, did you connect your venv (the one where you installed pyenchant) to Spyder following these instructions?
http://docs.spyder-ide.org/current/faq.html#using-existing-environment
—
Reply to this email directly, view it on GitHub<#368>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABKVUWXNPXGFVVNAR3M6V23ZAF6WXAVCNFSM6AAAAABHAXWHHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZGMYTAMBTGM>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Thanks for the extra info. You said:
But the thing is Spyder doesn't depend on Pyenchant. However, I think I know what happens: it seems you installed Pyenchant in the same venv where Spyder is installed. And Pylint has several spelling options that rely on that package, but for them to work you also need to install at least one of its dictionaries. One additional question: do you have your own |
The directory for the project area that I had opened does have a pylintrc that expects lint to be run with spelling checking enabled. One of the things that I was checking out was the pylint functioning and user interface within spyder-ide. The good news for me is that as a UK English speaker the default wheel dictionaries have me covered.
Personally, I like having my spelling checked by the computer as otherwise it is (and always has been) awful and in the work environment having the spelling of anything that the end user might see, e.g. strings used for prompts, etc. is largely compulsory. PyLint is smart enough to only check spelling inside of strings, docstrings & comments so you don't get deluged with complaints about the spelling of your variable, function & class names - unlike the spell checking in some other IDEs.
I am guessing the dependency goes - spyder -> pylint -> pyenchant (but only if spelling is on) so maybe just a note in the installation instructions would be the best bet.
From: Carlos Cordoba ***@***.***>
Sent: Thursday, May 2, 2024 5:46 PM
To: spyder-ide/spyder ***@***.***>
Cc: Steve (Gadget) Barnes ***@***.***>; Mention ***@***.***>
Subject: Re: [spyder-ide/spyder] Missing Spelling Dicts (Issue spyder-ide/spyder-docs#368)
Thanks for the extra info. You said:
1. Tweaking the dependencies for Spyder so that pyenchant gets installed with its default dictionaries
But the thing is Spyder doesn't depend on Pyenchant. However, I think I know what happens: it seems you installed Pyenchant in the same venv where Spyder is installed. And Pylint has several spelling options that rely on that package, but for them to work you also need to install at least one dictionary.
One additional question: do you have your own pylintrc file where you enabled those options because you want to do spell checking of your code with Pylint?
-
Reply to this email directly, view it on GitHub<#368>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABKVUWSONUJDRSCQPCEX47LZAJUSZAVCNFSM6AAAAABHAXWHHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRGAZTSNJWHA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Ok, that's what I imagined.
Ok, that's good to know.
Correct.
To be more specific, do you think we should add a note about it in our installation guide? Or in our docs for the Code Analysis pane? |
I personally would think that the installation guide would be the best bet. It might be worth adding a link to how to add dictionaries - https://pyenchant.github.io/pyenchant/install.html#installing-a-dictionary as I am well aware that not all of the world speaks or writes English. |
Ok, thanks for feedback @GadgetSteve. We'll take into account when fixing this issue in our docs. @CAM-Gerlach, please take care of this one. |
Installed with
pip install spyder
into a venv.Loaded a project, opened a py file & hit F8 - got:
pylint error: "en_GB" no such language choose from ''
Suspect that enchant is not seeing any dictrionaries.
Invstigating in the IPython console tried
import enchant
got no module. Tried%pip install -U pyenchant
- success then:Tried F8 again and this time it worked. Concluded that pyenchant not installed into environment. So I have a work-around but this might hit others.
Traceback
Versions
Dependencies
Environment
Environment
The text was updated successfully, but these errors were encountered: