I ve a problem with Atom text editor. I am trying to access IMAP4_SSL
attribute in imaplib package:
import imaplib
...
conn = imaplib.IMAP4_SSL("some.mail.server")
Which raises the following error:
AttributeError: module 'imaplib' has no attribute 'IMAP4_SSL'
I was trying to find cause for it. After trying the code above from conda prompt, the error was gone. So, I thought it should have something to do with the editor or "script" package of Atom. I checked sys.path
and sys.version
from Atom and there were no problems. python.coffee
configuration below:
exports.Python =
'Selection Based':
command: 'python'
args: (context) ->
code = context.getCode()
tmpFile = GrammarUtils.createTempFileWithCode(code)
return ['-u', tmpFile]
Edit: And I think the package imported successfully, because I can access other attributes of it like IMAP
Edit2: Most probably my problem is related with the following prompt which I get when I launch python in Windows Powershell:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
I've already tried to run activate.bat
script but did not work out and please notice that Anaconda is installed into another drive with Windows. But the following path is already included in environment variables:
D:/anaconda