DEV Community

Shan Khan
Shan Khan

Posted on • Edited on

PyCharm vs Visual Studio Code to boost Productivity?

As far I know we can do almost everything in both Visual Studio Code and PyCharm.
But which one is the best that boost your Python Productivity?

Top comments (14)

Collapse
 
theoutlander profile image
Nick Karnik

I've used most of the IDE's out there.

All of JetBrains' products are great! That's why I pay for them. If you've started on VSC and are comfortable with it and feel productive, there's no reason to switch.

At the end of the day, think about which IDE makes you feel comfortable and productive.

Collapse
 
shanalikhan profile image
Shan Khan

Yes, i used JetBrain's IntelliJ and found it very good. I am using Visual Studio Code and struggling with Pip Virtual Environments as of now and I heard PyCharm does it very well.

Thats why i wanted to hear the developers using PyCharm on their reviews about it.

Collapse
 
thebouv profile image
Anthony Bouvier

What issues are you having with VSC and venvs? I'd like to try and help you.

What are you using to set up for venv? python -m venv or pipenv or the older virtualenvwrapper stuff?

I recently started using pipenv and it is a godsend.

And telling your python project in VSC to use a particular venv is very easy. Let me know how I can help.

Collapse
 
alexmacniven profile image
Alex Macniven

I always find it quicker and easier to manually supply the location of the venv in the settings file(s) as Using the Select Python Interpreter command doesn't do a good job at finding them.

I use pipenv so all my environments are in my C:\Users\Alex\.virtualenvs\ directory so there could be a more elaborate solution where the vscode command would monitor this directory for any python executables?

Thread Thread
 
shanalikhan profile image
Shan Khan

Using the Select Python Interpreter command doesn't do a good job at finding them.

I just found setting python.venvPath to your virual env. will allow Interpretor to list them in Code.

For example :

"python.venvPath": "~/python-virtual-environments/"
Collapse
 
raulinlee profile image
Lee Raulin • Edited

Well, I want to prefer VS Code. It's my editor for choice for web development. But for Python... To name just one example, there are a lot of convenient features that work out of the box with Pycharm, whereas with VS Code... I tried to do a rename refactor... I Googled how to do it (which with Pycharm I never had to...it's right there in the right-click menu, and works exactly as expected), and it only renames in the one specific file I'm in. Intellisense doesn't work on my own local modules for some reason. Maybe I'm doing something wrong, maybe I can fix these things... But stuff like this seems to come up fairly frequently. And VSCode/Python seems to lead to more time wasted tinkering and troubleshooting before I can start my job of tinkering and troubleshooting.

Collapse
 
amr3k profile image
Amr

I used to use PyCharm while studying python, Then I started to discover Django when I found that it's NOT supported in PyCharm - Cummunity Edition which I had and it's available only in the paid version..
Then I started seeking a new IDE or even a text editor that supports at least Django's template engine.
It ended up using VS Code and It's the best IDE I found.
Jetbrains' products are great but I feel more comfortable using VS Code.

Collapse
 
shanalikhan profile image
Shan Khan

Yes Community edition doesnt support that.

Whats your views about the productivity by using scientific libraries like NumPy, Tensorflow etc in PyCharm?

 
thebouv profile image
Anthony Bouvier

I think you meant how does it compare to conda which is the package manager in Anaconda.

If you're an Anaconda user I'd say stick with conda then. Anaconda is an ecosystem into itself and conda and pipenv are pretty comparable. But since you're already in there, use conda imho.

You can use both, but I don't see why you would. And I don't feel like you're missing anything.

Thread Thread
 
shanalikhan profile image
Shan Khan • Edited

What issues are you having with VSC and venvs? I'd like to try and help you.

Actually i was using conda and was able to switch the virtual environment by single click in code

I have recently switched to 'virtualenv' and didnt find the tap to switch the virtual environments in code.

The problem i faced in order to leave anaconda is that initially i was using anacoda and tensorflow was not working correctly for my code, it worked for other code but not one file.
I spent two days finding out what is the problem in my code and shared with coworker and it worked fine over there, he was using virtualenv using pip instead of anaconda.

I uninstalled and reinstall conda Tensorflow but error persisted so i removed anaconda and switch to pip way and my problem was fixed.
IMO pip way of installing packages are good compared to conda way. For students conda is good!

Collapse
 
adamryczkowski profile image
Adam Ryczkowski

You have not mentioned yet that VSCode does not support more than one monitor. No floating windows. There are awkward workarounds (see github.com/Microsoft/vscode/issues...) that involve running manually separate instances of VSCode. Pycharm does it natively.

For many it is a showstopper.

Collapse
 
byegates profile image
byegates

Het Matt,

What you described sounds like a great idea!!
"we save our .yml environment files to each project repo, and when our production server syncs with the master branch, it automatically rebuilds the conda environment and activates them via batch files when running the repo's code",
I am learning python I wonder could you elaborate on how to do this or point me to some good references?

I would really appreciate any help!

Collapse
 
shanalikhan profile image
Shan Khan

What type of problems you faced in Pip that made you to move towards anaconda.

Recently i was having problem in anaconda so i have switched to virtualenv using pip

Collapse
 
quevon24 profile image
Kevin Ramirez

It's possible to add the environments created with pycharm to visual studio code? And if it's possible, how?