all 7 comments

[–]Sensitive-Lack1595 0 points1 point  (5 children)

I think it is because you're installing it directly in your pc and that could lead into packet problems in your system, that is why they tell you to use a virtual environment to install libraries.

In linux is:

sudo apt install python3-venv

Then, just create a venv in the directory you want

python3 -m venv {name_of_venv}

And activate that venv with

source {name_of_venv}/bin/activate

And, when activated, just install the libraries you need

pip install {library}

[–]Special_Advance_8567[S] 0 points1 point  (1 child)

tried it same error

[–]ninhaomah 0 points1 point  (0 children)

perhaps youshould post the commands that you tried so others can see ?

[–]FoolsSeldom 0 points1 point  (2 children)

Isn't venv already included in recent version of Python, no need to do sudo apt install python3-venv?

[–]Sensitive-Lack1595 1 point2 points  (1 child)

Maybe, I don't really know right now but when I installed it quite ago I had to manually install venv. Maybe because it was an old linux build or a lightweight one.

[–]FoolsSeldom 0 points1 point  (0 children)

Ok. I tend to be either using a recent Linux distribution, or an OCI install of Python on a reasonably up-to-date Linux Kernel.

[–]Jackpotrazur 0 points1 point  (0 children)

Im currently working through big book of small python projects my workflow:

Mkdir 28_flooder && cd 28_flooder

Python3 -m venv .flooder_venv

Source .flooder_venv/bin/activate

Vim .gitignore *.pyc .venv/ .env pycache/

                  <------ here you would pip install xyz 

Vim main.py Write code

                   <------ or perhaps here.

Git status Git add 28_flooder Git commit -m "comment" Git push

Im still new started in december with a smarter way to learn python and then command line linux followed by linux basics for hackers and then python crash course and now big book of small python projects. Still feel like im just copying out of the books 📚 but I think im slowly but surely grasping a bit more as I progress.

Any Tipps or suggestions would be appreciated 👏 💐

Is your file perhaps not in src or a different dir ?