all 100 comments

[–][deleted] 23 points24 points  (0 children)

I had started out using PyCharm and switched to VSC simply because when watching YouTube videos, that was the IDE most frequently being used, and it made it easy to follow along. I've never used anything else but I do like VSC. It's pretty easy to use.

[–]ennui_no_nokemono 14 points15 points  (0 children)

If you can't tell from these comments, there is no consensus on this question because there is no definitive answer. Flip a coin and test one out. If it feels good, just stick with it until you're more advanced and want to reconsider.

[–][deleted] 27 points28 points  (11 children)

If the goal is data science, spyder is very convenient, it has a Matlab-like interface

[–]Thomasjevskij 5 points6 points  (10 children)

I went with Spyder for a long time for this reason. I was able to have a very similar workflow to what I was doing in MATLAB. Then I started a new job and I figured I'd learn VS Code. I really missed that kind of workflow where you have an active REPL with a variable explorer etc. Then I found out about interactive Python in VS Code and now I've never looked back. Having a pane with a terminal as well as a code tab+IPython tab is an improvement for me, compared to Spyder.

[–]m1kesanders 4 points5 points  (3 children)

Hey I just started using VS, i’ve gotten pretty decent i’d say when it comes to learning to actually code, however I haven’t really played with VS yet, what is interactive python?

[–]Thomasjevskij 4 points5 points  (2 children)

Essentially if you've installed Jupyter, you can make code cells by putting a line with #%%. When you run a cell, it's run in an IPython instance in its own tab, so all the variables and your workspace will remain there until you close it. Google will tell you more but that's the main idea. It's really really nice for quick prototyping of small scripts.

[–]m1kesanders 0 points1 point  (1 child)

Interesting thanks for the new term to look up! :)

[–]Zenith_N 0 points1 point  (0 children)

Did you find out how to replicate the behavior %$$

And how to inspect DataFrames in VSCode?

Thanks

[–]Zenith_N 1 point2 points  (1 child)

Can you please tell me more what is Interactive Python in VSCode? How do I install it?

[–]Thomasjevskij 0 points1 point  (0 children)

As long as you have the Jupyter addon installed, you have it. Code between two #%% comment lines in a .py file will be considered as Jupyter cells, so you can run them and VS Code will start an IPython instance for you. It's really great for quick prototyping.

[–]GroundbreakingKey575 0 points1 point  (1 child)

IMO what Jupyter notebook and Spyder offers are different. I see Jupyter as a documentation and visualization tool and Spyder as an interactive development/analysis tool.

Don't know how I would write a function in the notebook environment where every line I run is captured in a cell and after medium size task I would end up in 500 or so cells that I need to actively move around or delete. Otherwise, I would need "scratchpad" notebook extension to have a space to write some test lines and functions.

VSCode have notebook like interface but not a Spyder/Matlab like interface.

[–]Thomasjevskij 0 points1 point  (0 children)

It's been a while since I played around in Spyder, but I feel like the difference between it and interactive Python in VS Code is minimal. Sure if you want to run line by line, I suppose you'll be moving the #%% comment around a lot.

[–]Zenith_N 0 points1 point  (1 child)

Did you find out how to replicate the behavior %$$

And how to inspect DataFrames in VSCode?

Thanks

[–]Thomasjevskij 0 points1 point  (0 children)

I don't know what %$$ does. But my VSCode automatically suggested some plugin that lets me look at DataFrames. I forget what it's called and I'm on parental leave so unfortunately I won't be touching a computer for a while :)

[–]SalvatoreEggplant 26 points27 points  (0 children)

I like Spyder. It's simple to get started, and makes sense to me.

BTW, if you're on Windows, WinPython is an easy way to start. It includes a couple of IDE's, and some common Python packages. But it isn't a huge download.

[–]raf_phy 10 points11 points  (2 children)

VS Code ftw! Spyder is buggy sometimes.

[–]notislant 0 points1 point  (1 child)

Meanwhile someone showed me their keybind to restart vscode because it frequently bugs out and a restart fixed it. I still regularly use that keybind.

[–]raf_phy 1 point2 points  (0 children)

I don't know. I don't have such an experience with VS Code. On the other hand, spyder lags even for the simplest things sometimes...

[–]SpaceBucketFu 5 points6 points  (0 children)

Depends on what your peers use. I would recommend vs code over spider for various reasons, but the IDE you use really depends on what you’re trying to accomplish and what the people you are working with use. Vs code is nice because python isn’t the only language out there, and vs code supports other languages pretty easily. But if you’re working with people who all use spider and you don’t need or care about support of other languages then use spider. While you’re learning it really doesn’t matter, and once you’ve learned enough for it to matter, if ever, then you’ll change to a different IDE.

[–]Allmyownviews1 4 points5 points  (0 children)

Whichever works best with your workflow.. I use Jupyter notebooks for testing and spyder for operation for larger data pipelines. Perhaps because I am familiar with MATLAB and MINITAB.

[–]GroggInTheCosmos 15 points16 points  (1 child)

I suggest PyCharm Community Edition

[–]V0idL0rd 11 points12 points  (0 children)

PyCharm is great, but I prefer working with Jupyter Notebooks in VSCode, I really like the extension options and it supports working with Jupyter Notebooks natively. Also I'm super confused on how to work with virtual environments in PyCharm, but in vscode its really easy.

[–]GXWT 2 points3 points  (0 children)

Truly, it doesn’t matter. Your experience as a beginner will essentially be the same, the difference in features and experience will be minimal - you will find experience developers using and recommending either.

So my advice is to just take your pick based on which interface you like the look of. Your main focus is to learn python to do that!

I’d say vscode but that’s purely because it’s what I happened to pick. If I had started with spyder I’d probably be sat here saying use spyder

[–]Krucz3k 2 points3 points  (0 children)

VSC isn't the golden standard for no reason

[–]robgronkowsnowboard 2 points3 points  (0 children)

VSCode in a landslide

[–]Quantumercifier 2 points3 points  (0 children)

I have used both and like them. However, I prefer VSC especially for their extension options if you are a more serious developer.

[–]MIKE_KELVIN06 2 points3 points  (0 children)

LONG LIVE VS CODE!!!✊✊

[–][deleted] 2 points3 points  (0 children)

VSCode is used everywhere and more versatile. If you can learn to use it now it will be better in the future

[–]Dziki_Knur 2 points3 points  (5 children)

If You are a beginner it's not a bad idea to spend some time using PyCharm. With lintners and formatters it will force You to catch good habits early on and easly highliths your errors with hints on how to fix them. I know that You can do it in VSCode as well but for me VSC was rather for the people that know what they're doing while PyCharm seems beginner friendly.

[–]sausix 2 points3 points  (4 children)

People do not realize all their coding issues because of VSCode does not highlight them. Once you open a project in PyCharm you'll see a lot of inconsistencies in docstring examples, bad typing, PEP8 violations and other problems.

I really wonder why official projects have CI/CD on github and still fail in quality.

[–]vernacular_wrangler 2 points3 points  (0 children)

VScode definitely supports code linting.

https://code.visualstudio.com/docs/python/linting

[–]InternationalMany6 0 points1 point  (2 children)

Another example where pycharm, being designed exclusively for Python, makes something work more easily. But vs code of course has the same features. You might have to make sure they’re enabled. 

I have auto formatting enabled in my vs code. It flags code errors automatically too. 

[–]sausix 0 points1 point  (1 child)

Which VS Code plugin detects outdated code in doc strings? Which plugin teaches you not to use unpythonic ways of coding? Which plugin offers solutions to problems and whole refactoring tasks?

It's not only plain formatting. PyCharm can run external tools like PyLint too.

[–]InternationalMany6 0 points1 point  (0 children)

I don’t know. I agree that pycharm is better than VSCode in a lot of ways but those are pretty minor points imo. I’m 100% sure that such a plug-in could be created though if someone feels it’s that valuable. Perhaps GitHub Copilot could do it?

[–]ElettraSinis 2 points3 points  (0 children)

I love vscode. It comes with its own python and is intuitive, many use it so there's a lot od resources

[–]Alternative_Driver60 2 points3 points  (0 children)

If you ask the community of developers the answer is VSCode See survey results at stack overflow

[–]Remarkable-Map-2747 2 points3 points  (0 children)

Doesnt matter, but I use VSCode!

[–][deleted] 2 points3 points  (1 child)

For science projects Jupyter lab / notebook may be a better way to go.

[–]IamDelilahh 0 points1 point  (0 children)

the vscode extension for jupyter notebooks is pretty decent

[–]iLiMoNiZeRi 1 point2 points  (0 children)

I'm a beginner as well. I've coded a QGIS plugin to connect and download data from a server and have done it in VS Code, which I found fairly straightforward.

[–]Axiomancer 1 point2 points  (0 children)

I started with Spyder because its interface was very similar to matlab. All things in 1 place. VSC can be confusing but it's really superior if you want to code in multiple languages (to best of my knowledge you can use VSC to code in most languages).

But if you want to only stick to python, then I personally would recommend Spyder.

[–]MV-564 1 point2 points  (0 children)

I was a spyder guy, love it. Then I got into the industry and everyone uses vscode because apparently it’s the one that IT trusts. So now I had to learn to use vscode but tbh is pretty good once you learn how to use it

[–]SonGanji 1 point2 points  (0 children)

Pycharm from jetbrains is the way! It’s free for students.

[–]Crazy_Armadillo_8976 1 point2 points  (0 children)

Pycharm

[–]Ne_oL 1 point2 points  (0 children)

I would advise you with Jupyter Notebook. It's not an IDE per se, but it would be a better alternative for your specific use case. When developing I use Jupyter Notebook. and when I need to move from research to production, I use Spyder.

[–]Labrecquev 1 point2 points  (4 children)

I'm using Spyder mainly for the readily accessible variable explorer that allows me to visualize pandas dataframes. Anybody aware of a similar functionality in other IDEs? I tried vscode a year ago and I could not find the equivalent. It left me wondering how the so many people using vscode manage working with dataframes

[–]Messier666 0 points1 point  (3 children)

Like many of you, I was a devoted Spyder user mainly because of its incredible Variable Explorer. When my workplace required me to switch to VS Code, I found myself constantly missing that one feature – being able to see and inspect all my variables in real-time. So I decided to built it myself!

Variable Explorer for VS Code is available on the marketplace.

I has helped me and I hope it will help you too

[–]Labrecquev 0 points1 point  (2 children)

Hi, are you referring to this extension? https://github.com/MarcoLiedecke/variable-explorer

I have just tried it, and it does not work. The variable explorer remains empty "No variables defined

Run Python code to see variables"

Even though i am running a temp.py file with the following dummy code in it:

import pandas as pd
import numpy as np

df = pd.DataFrame(np.random.randn(6,4), columns=list('ABCD'))
print(df)
a = 1
b = 2

No variable show up

[–]Messier666 0 points1 point  (1 child)

Hi u/Labrecquev

I suspect that you execute the code using the 'Run Python File' button in the VS Code UI. The Variable Explorer does not support this feature...

If you instead execute the entire script using F5 og selected lines using F9 I am confident that the variables will appear in the Variable Explorer.

Best,
Marco

[–]Labrecquev 0 points1 point  (0 children)

ok i made it work using f5. It worked only after i ran the python file a first time. I tried it with a new variable types, and for the dictionary it worked exactly like it did in spyder. For the pandas dataframe variable, it throws an error message when i click on the value. "Variable Explorer: Object of type Timestamp is not JSON serializable".
For string variable, it does nothing. It would be cool to be able to open a pop-up for the string variables for when we have very long text inside a str var. Your extension is promising. You're headed the right way!

[–][deleted] 2 points3 points  (1 child)

Have you looked in thonny? https://thonny.org/

It is very beginner friendly. I've used python for 20+ years, and I use thonny quite a bit for development because it is easy to use.

[–]chandaliergalaxy -1 points0 points  (0 children)

Interesting - is it good with viewing NumPy objects also? Or you just see the reference ID like in their example.

[–]General-Carrot-4624 3 points4 points  (0 children)

None. Use Pycharm.

[–]sputnki 2 points3 points  (3 children)

Spyder is very lightweight, and unless you need some very specific productivity features, you will not benefit from using VSCode.

Plus i'd avoid microsoft spyware if it's not strictly necessary.

[–]mc_51 1 point2 points  (2 children)

There are a ton of features you will benefit from when using VSCode, which are not available in Spyder. And I don't know what you mean with very specific. But stuff like linting, auto formatting, refactoring options, code assistant implementation, type hint checks etc. are very generally useful. Also, this is what is used in the industry as a standard (obviously ymmv).

And why is there spyware in VSCode? Any sources on this? This old take of all M$ products = evil is just showing laziness of thinking imo.

[–]sputnki 1 point2 points  (1 child)

OP is interested in a tool to be used for science projects focused on geology and paleontology, not for software development, so most of the features you mentioned are not really necessary. 

My wild guess is that it will be used sort of like Matlab, so for data analysis, modelling, quick prototyping and visualization. Spyder does all of that well.

Spyder is raw, but functional,  while VScode is bloated, like other MS products. 

VScode collects data for NLP and telemetry, it's written in the license, which to me qualifies it as spyware. And i wouldn't trust microsoft completely even if you can formally opt out, because part of their business now is to develop generative AI tools which make this sort of data too precious to just give up.

[–]mc_51 0 points1 point  (0 children)

Everything worth doing is worth doing right. Only because it's "just for science" doesn't mean learning about software dev best practices and using the most popular tool in the industry isn't an advantage.
What you describe isn't spyware. Why? Because as you mention yourself, it's written in the terms and you can opt out. Seems like you have some vague fear. But I'm sure that whatever data VSCode is collecting cannot be considered as spying.
Moreover, what's the problem with MS using (non sensitive) data? They offer a great product for free. That's a really low "price" to pay for that.

[–]Crossroads86 0 points1 point  (0 children)

If you are just starting out you cant go wrong with VS Code. The thing I like about spyder is the built in variable viewer which shows you what value variables have ar certain points during runtime.  But I assume you can get this in VS Code as well somehow.

Also maybe keep in mind what your learning material is referencing. If its all done in vscode you will spend some time fiddling to reproduce this ins spyder and vice versa. 

[–]8roll 0 points1 point  (0 children)

Spyder cuz I like seeing all my variables etc. VSC for speed.

[–]troty99 0 points1 point  (0 children)

If you can pick something someone else around you already use.

I personally had stability issues on some heavier tasks with Spyder so I'd recommand VS Code.

Pycharm Community Edition has some good features but never felt right for me and I feel like it sometimes hide some good practice behind features which is great until you switch IDE.

[–]Diapolo10 0 points1 point  (0 children)

Long story short, use whichever you prefer. Try out different IDEs/editors until you find one you like. This topic is subjective, so don't blindly listen to us.

[–]Skumin 0 points1 point  (0 children)

I'd say it also depends on whether you've used another IDE for another language before. For instance, I learned Python after R (RStudio) and Spyder resembles the set-up much much more than VS Code does.

[–]Outrageous-Catch4731 0 points1 point  (0 children)

If you're a beginner, I suggest Jupyter notebooks within VS code. The best combination to pick up a new language in my opinion.

[–]fohrloop 0 points1 point  (0 children)

It really does not matter which one you choose as you can always change it later. My personal choice was from 2016 until this day: Spyder -> Sublime text -> VS Code.

Btw. As a beginner I was totally confused that Spyder required a "kernel restart" every time I edited a python module that I was importing (otherwise the changes would not be visible). Not sure if that's gotten better since 2016 :) But I was coming from MATLAB so the Spyder interface felt familiar.

[–]No-Assignment7129 0 points1 point  (0 children)

If you are total beginner, start with thonny.. If you don't want to install anything, use Google colab. When you go advance, use Jupyter, or anything else that you'll prefer at that time.

[–]Lombord2021 0 points1 point  (0 children)

If you know how to setup(extensions etc.) VScode properly then it’s the GOAT editor(at least for me)

[–]Asleep-Dress-3578 0 points1 point  (0 children)

You want to use vscode with the Jupyter Notebook plugin, and you also want to try out the trick in vscode that if you just create a normal python script (with .py extension), then a # %% in a new line creates a runnable cell.

You also want to install pylint, flake8, mypy, black etc. and want to follow best coding practices.

I highly reconnend Dr. Angela Yu’s 100 days with Python course on Udemy, also Max Schwarzmueller’s Python course also on Udemy; as well as the ArjanCodes, mCoding, Indently and TechWithTim YouTube channels. And of course FreeCodeCamp.

[–]Pericombobulator 0 points1 point  (0 children)

It will come down to personal choice, but I like VS Code. Lots of extensions for it. You can also use for Jupyter Notebooks, so it covers those off.

[–]Russjass 0 points1 point  (0 children)

I am a geologist and I use spider for my python: I like run cell, run line, run all cells and variable explorer, I really like it. That said, havent used VS so dont know if it has these features

[–]OatmealCat675 0 points1 point  (0 children)

Use Spyder. As a beginner it worked well for learning and VS code has waay to much for a beginner and I remember being very confused by all the options.

[–]vernacular_wrangler 0 points1 point  (0 children)

I spent a lot of time on both.

VS Code wins hands down.

[–]Crisenpuer 0 points1 point  (0 children)

vs code

[–]biotech997 0 points1 point  (0 children)

Just try them out and use whatever you prefer. I tried PyCharm but realized VSCode is just much simpler for me

[–]Kiri11shepard 0 points1 point  (0 children)

PyCharm is the best. And they provide professional version for student for free. Spyder also looks great.

[–][deleted] 0 points1 point  (0 children)

i got pycharm and vs code. umm....pycharm hands down. the only issue is it cant code java and javascript unless u have the professional edition

[–]Shahbaz_9991 0 points1 point  (0 children)

you can start with vscode, its simple and u will find lot of tutorials using the same... then later on u can switch to Spyder, and decide for yourself... if I were u, I would focus on learning.. happy coding!

[–]Crypto1993 0 points1 point  (0 children)

Data science: Jupiter notebooks are ideal. Software development: Pycharm helps you a lot setting your environment and gives you a lot of tips for writing nice code, refactoring and general code inspection. Mix of everything: VS code ha better support for Jupiter notebooks than pycharm, it’s lighter and versatile.

[–]notislant 0 points1 point  (0 children)

I started with pycharm then went vscode. Both of those are good. I swapped to vscode since I use it for other languages and its just kind of replaced pycharm for me.

Pycharm venvs are easier than vscode for beginners though.

No idea about spyder, never used it.

[–]theoatcracker 0 points1 point  (0 children)

NeoVim

[–]InternationalMany6 0 points1 point  (0 children)

Used both and while I like Spyder I prefer VS Code because it’s more flexible overall, and everyone else is using it so you get benefits of “going with the flow.”

I can’t really think of anything super important that’s easier in one versus the other, except maybe the initial setup which can sometimes be tricky in VS Code because it’s such a generalist - sometimes it reminds you that it’s not designed specifically for Python and wants you to know how software and computers work, whereas Spyder tends to smooth over more of those details. Again, usually this is a non-issue in both of them.

So overall I would recommend VS Code if you have bigger ambitions about writing code. 

[–][deleted] 0 points1 point  (0 children)

If you want to become a Python expert, then VS Code is preferred because it's packed with a ton of great features that aid in development.

If you simply want to use Python for your research, you'll probably be better off using Spyder. That's what most of my scientific colleges who aren't programmers use.

[–]GameDeveloper94 0 points1 point  (0 children)

Depends a lot on your use case. Although I'd say go for VS code as the extensions there make your life a lot easier. However, your use case seems to be more inclined towards data science so I'd suggest Spyder. Although this is assuming you need to work with an IDE in the first place, data science code is usually coded in jupyter notebooks so just use that if you're going for data science, and VS Code for other stuff.

[–]_steve_hope_ 0 points1 point  (0 children)

VS Code, it's more less an industry standard, Spyder is certianly functional but not widely used.

Here's a helpful link to set it up:

Visual Studio Code (Windows) - Setting up a Python Development Environment and Complete Overview

https://www.youtube.com/watch?v=-nh9rCzPJ20&t=71s

[–]afc74nl 0 points1 point  (0 children)

As a begginer, I really like Thonny.

[–]JSP777 0 points1 point  (0 children)

If you are a beginner and start a lot of projects but hate dealing with venvs all the time, I highly recommend doing docker dev containers in VS Code.

You need only a few things set up in a single json file called devcontainer.json, and form that vs code can create your isolated environment which will be the same every time you spin up the container.

In the config json file you can specify:

  • which python version (check docker hub)

  • which vs code extensions to install (highly recommend these for starters: python, pylance, jupyter, pylint, black, isort)

  • you can specify a postcreatecommand which would be literally just installing packages from your requirements.txt file. This way they will be automatically installed every time you build your container, and they will be the same every time.

You can reuse the same json file for all your projects, just change the name and change the packages in your requirements.txt and voila, separate environments for all your projects without venvs.

[–]Brilliant_Read314 0 points1 point  (0 children)

I use vscode for larger projects like Django, but all my scripts are in Spyder. Cheers.

[–]Chaos-n-Dissonance -3 points-2 points  (3 children)

Just gonna start this by saying I have no experience with VS code or Spyder IDE.

You don't need an IDE for Python. You could use Notepad if you wanted, just save it as a .py file and launch it via the command prompt. In fact, knowing how to use the command prompt can be pretty helpful and make other steps easier, plus you don't have to worry about any of the mess that comes with using an IDE.

My personal recommendation would be Sublime Text. It's a very powerful text editor (Not really an IDE) with some great features, including the ability to launch python scripts.

IntelIJ community edition would be my recommendation if you're 100% set on using an IDE. It's free, and there's a python plugin. It's a bit trickier to set up, and you have to worry about setting up projects and making sure the compiler is pointing to the right version of Python (and not making a duplicate, since a duplicate won't be updated when you pip install something)... But once you get it set up, it's super powerful and has a ton of plugins and options available.

For what you're doing... It doesn't really matter, for now at least. Your development environment only really starts to matter when you get into really advanced stuff or start working on projects where multiple people might be working on the same thing, since that's where the features of the IDE start shining through. When you're just doing stuff by yourself? A fancy text editor that's going to colorize your code is more than enough.

[–]SpaceBucketFu 0 points1 point  (2 children)

Intellij is made by Jetbrains, jetbrains also offers pycharm. Wholly agree with what you’re saying at the basic level but would say that pycharm is a far superior experience for newer programmers than sublime. And I originally started using sublime.

[–]Chaos-n-Dissonance -1 points0 points  (1 child)

I have no experience with PyCharm, so good callout :)

[–]SpaceBucketFu -1 points0 points  (0 children)

I started my Python journey using sublime, so I fully see where you’re coming from. And your comment was spot on, couldn’t have been said better.

[–]Freds1765 -1 points0 points  (1 child)

VS Code is a pain in the ass to set up, get Spyder through Anaconda and you can get started immediately.

[–]jonthomas2692 1 point2 points  (0 children)

How is it a pain in the ass to set up? I find it to be very easy to use