Return to Level1Techs.com

Trying to get started with Python / PyCharm IDE

So I want to teach myself Python. I am right at the start of this process. However I find it hard to just go through mindless exercises in a book if they don’t have a practical application to something I want to do.

So the other day I was happy to see the following in my RSS feed.

Great I thought! I can use that. It is actually something I WANT to do.

I could already see he was using PyCharm so I installed it and tried to get started.

It seems I am failing right out of the gate though with the IDE.

I can’t even make my “import” of modules work or seem to add a variable.

His

Mine

I found where to install modules manually but it still does not work.

Am I doing something really stupid?

Any help or advice appreciated.

from x import y

In your case it would be:

from bs4 import BeautifulSoup

Edit: Unless BeatifulSoup comes from a different module. Then pycharm is probably complaining about having 2 imports on the same line.

Try:

import bs4
import BeautifulSoup
3 Likes

I am / was being impatient. More was explained further on in the video.

Note to self: Watch the whole thing before breaking out the tools.

Thanks for your reply.

4 Likes

Also turns out when I went back and looked at an earlier video, he is not using PyCharm but IntelliJ IDEA.

IMO if you’ve never learned programming you’re better off with no IDE (full blown code editor, debugger + other development features integration). Using PyCharm is like using a race car when you can’t even drive. It’s a hyperbole, but at some point you’ll fight the tool or its configurations & get distracted, it’s a common pattern.

Some people started with just IDLE or plain/simple code editors that do autocomplete/color coding, some can even use online editors, that’s usually more than enough. Start simple, you want to ease into coding & focus on learning the ins & outs of the language, not becoming a professional developer overnight. You’ll find the need for IDE when you need it, not at the very beginning. I still use Sublime Text. Even VS Code is better than PyCharm for absolute beginners.

1 Like

Having used it I agree. It was making suggestions that didn’t help. I will go with Atom next time.

if anything you could try even nano or vim

1 Like

Ooof.

Been there and back again. With the evolution of smart tools, I can’t see myself ever going back again.

My current preference is VS code. I can choose to use the lint tools or not, but I can’t break with the symbol lookup tools. Yes, I know VIM can be made to symbol highlighting and such, but I just can’t go back.

I started my career with vi and emacs in the unix world and edlin on DOS.

Too each their own. Whatever fits your personal workflow, go with it.

1 Like

A nice simple editor to use for python is Mu-editor.

https://codewith.mu/

You can install it with pip. It also works well connected to project boards with CircuitPython.

I see my “noobs of python” tag is used… I guess I should have kept the tutorial series going. :sigh:

I was getting backlash from the community here for posting Python Tutorials, some people were helpful, but there were always some troll jumping in to ruin the fun. I was going to do deep dives into Network Hacking and OpenCv but oh well.

@ro55mo If you need help with Python or Projects to work on, post here or let me know. I’m willing to help !

1 Like

I’ll be honest.

I was kinda joking, I don’t agree in learning trhough memorizing words and stuff.

To OP:

Learn comfortably, the most important thing in programming is laying out the logic, the language and other tools are just means to an end. If you wanna code in python with voice recognition you’ll still be programming and might still be good

don’t worry bout the tools, worry bout the carpal tunnel syndrome, I mean, the logic itself

They work, pycharm keeps unused variables in gray color. So your imports do work.

if you write something like:

a = BeautifulSoop()
and
r = requests.get(url)

you will see them change color.
edit: example from my pycharm

Cheers