0
votes

I am learning data science, using Python and I suddenly found it take so much time to load these lib like numpy,pandas when I use Pycharm or sublime text3.

But when I use Spyder which has been installed by Anaconda to run my program, it's super fast!

I really want to use Pycharm, how to make it as fast as Spyder?

I also found Spyder will run several Python.exe, Spyder will run 5 python.exe background while sublime just one. Is it the reason that it's so fast?

For example to import these libs: [import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np from scipy.stats import norm from sklearn.preprocessing import StandardScaler from scipy import stats import warnings import sympy

]

Then it will take:

sublime 4.1 seconds

Spyder 0.06 seconds

1
(Spyder maintainer here) Are you taking about getting code completions in Spyder's Editor or about loading those modules in its IPython console? If it's the Editor, we have several optimizations to load scientific libraries quickly that (to the best of my knowledge) other editors don't have. If it's the IPython console, there shouldn't be much difference between Spyder and, say, PyCharm.Carlos Cordoba

1 Answers

1
votes

You can use Jupiter Notebooks directly in Pycharm.
See here.
As far as my understanding goes, Spyder uses a Jupyter kernel so it does not have to reload all your imports all the time. Spyder runs the kernel in the background, where Pycharm starts a new Python instance each time you hit run. Each one of those has to load all the dependencies again.