Open neo2887 opened 3 years ago
When I use control(^) + ` in sublime text, calling the command line, and run sys.version, I get
>>> import sys
>>> sys.version
'3.3.6 (default, Mar 30 2018, 11:14:15) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]'
Which is different from the python version I use in os command line and jupyter notebook.
What I get from terminal,
(base) mona@NaBookPro GoogleTrends % python3
Python 3.8.5 (default, Sep 4 2020, 02:22:02)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'3.8.5 (default, Sep 4 2020, 02:22:02) \n[Clang 10.0.0 ]'
I got error when I tried building import pandas as pd
.
Traceback (most recent call last):
File "/Users/mona/Dropbox/GoogleTrends/GGT_sorting.py", line 1, in <module>
import pandas as pd
ImportError: No module named pandas
[Finished in 0.0s with exit code 1]
[cmd: ['python', '-u', '/Users/mona/Dropbox/GoogleTrends/GGT_sorting.py']]
[dir: /Users/mona/Dropbox/GoogleTrends]
[path: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
It is quite weird... since the build system worked fine before I start this issue. Before the issue, I set in anaconda Settings - user, "python_interpreter": "/Users/mona/opt/anaconda3/bin/python"
, then I set it to "python3" during editing the issue, and set it back to the path I used before. Then the error pops out...
It looks like Sublime Text is picking up your system python, instead of your Anaconda Python installation. The Anaconda Individual Edition documentation does have some examples of how to setup other IDEs to use their Anaconda installation and hopefully that will help you figure out how to configure it correctly for Anaconda. https://docs.anaconda.com/anaconda/user-guide/tasks/integration/sublime/
It looks like Sublime Text is picking up your system python, instead of your Anaconda Python installation. The Anaconda Individual Edition documentation does have some examples of how to setup other IDEs to use their Anaconda installation and hopefully that will help you figure out how to configure it correctly for Anaconda. https://docs.anaconda.com/anaconda/user-guide/tasks/integration/sublime/
Thank you csoja!
I followed their instruction exactly, and the problem still exists.
I've set "python_interpreter" to my local path: "/Users/mona/opt/anaconda3/bin/python" and it does not make a difference.
Actual Behavior
Hi guys, I use Sublime Text 3 and Anaconda package to code in python on OS Catalina. My python version is 3.8.5 for anaconda distribution.
However, when I use command line in ST3 and run sys.version, it returns 3.3.6, which I think does not carry most packages that managed by anaconda, like pandas, numpy and so on. So when I editing my codes, I am used to type the package/module name, the press TAB to find what I need to complete the script, but it does not show any attributes or functions from the module while those keywords I've used in the script are still available.
Expected Behavior
For example, my script has
I expect when I enter `x = np.' then press TAB, there should come a list of available functions/modules/attributes provided by the numpy package, as any other IDE would do. Now, it just doesn't, except for those I've used already in the script.
I've used ST3 before, and everything was fine then. Things get different when I downgrade my OS from Big Sur to Catalina, and I reinstall anaconda3 and Sublime Text3.
Anaconda or Miniconda version:
Operating System:
OS Catalina
conda info