These are chat archives for spyder-ide/public
I definitely miss the smoothness and complete-ness of Rstudio, but there are a few reasons for the difference as I understand it. First, Rstudio only does dynamic analysis to do completion—i.e. you have to have loaded the package or run the code that you're trying to complete; Rstudio won't complete something that isn't already loaded into memory (at least, that was how it worked back when I was a big Rstudio user). This is what Spyder does in the Console by default, though you can enable several options in the preferences to allow for "greedy" completion, or to use static analysis (Jedi) instead. Meanwhile, the Editor uses static analysis to get its completions, which can be somewhat less snappy and comprehensive than dynamic analysis since it has to do all the hard work itself (rather than just viewing the "result" in memory) but do not require running your code first and is updated on the fly as you make changes, vs. requiring a re-run. Due to differences in the best-practice Python data analysis workflow vs. what's more common in R, as well as philosphical differences between Spyder and Rstudio, this makes more sense than it would in R, though it sometimes takes time to appreciate.
Finally, there are a few other factors making it more difficult in PyData vs R: to the fact that most of the core PyData packages are compiled C++ code, most of the array/dataframe/data science syntax bolted on vs. being a core part of the language, being an overall a little less high-level and application specific and more flexible and powerful, vs. a language designed to be highly introspectable like R (at the cost of performance and utility for general-purpose programming), as well as other package- and language-specific issues with introspecting certain functions and methods, its just not as simple a problem to solve. In particular, there are a lot of known issues with Pandas and completion that affect most if not all other IDEs' completion engines as well that are difficult if not impossible to solve on our end. But what we can do, hopefully LSP will help a lot, at least ensuring we have parity with the other top Python editors.
@vchan13620_twitter That doesn't really have anything to do with Spyder, actually. However, if you're using Anaconda (as we recommend), you can do so by simply creating a new Python 3 environment to work in with
conda create -n python=3 and installing the packages you want to work with (such as
spyder). Or, if you are currently running Anaconda2, you can switch to Anaconda3 (recommended) by just uninstalling your copy of Anaconda2 and installing Anaconda3 (we strongly recommend the x64 and Python 3.6/3.7 version unless you have specific requirements that dictate otherwise) from Anaconda.com.
Otherwise, it depends on how you installed Python; you can download a package from python.org with the newest version, or through your system package manager. However, we recommend Anaconda since it simplifies a lot of the process, avoids many common errors and pitfalls with other methods, keeps things isolated in their own environment and is what we are able to offer individual install-related support for.