Python Forum
Need help i just started the whole thing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help i just started the whole thing
#11
(Sep-11-2022, 08:23 PM)gabriel789 Wrote: when you say virtual environment you mean like virtualbox
Can say it similar but instead of creates a OS,it's make a new stand alone Python environment.
It's build into Python trough venv or there 3-party lib like Poetry.
Purpose of Python virtual environments is to create an isolated environment for Python projects,
means that each project can have its own dependencies,regardless of what dependencies OS Python or other project has.
Example.
# Make 
G:\div_code
λ python -m venv new_env
 
# Cd in
λ cd new_env\
 
# Activate
# Linux <source bin/activate>
G:\div_code\new_env
λ G:\div_code\new_env\Scripts\activate
 
# Install
(new_env) G:\div_code\new_env
λ pip install requests
Collecting requests ..... 
Successfully installed certifi-2020.12.5 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.3
 
# List packages in environment 
(new_env) G:\div_code\new_env
λ pip list
Package    Version
---------- ---------
certifi    2020.12.5
chardet    4.0.0
idna       2.10
pip        20.2.3
requests   2.25.1
setuptools 49.2.1
urllib3    1.26.3
 
# Show
(new_env) G:\div_code\new_env
λ pip show requests
Name: requests
Version: 2.25.1
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: g:\div_code\new_env\lib\site-packages
Requires: idna, certifi, chardet, urllib3
Reply
#12
can you send me all information and how to download all necessary files. Im currently using Ubuntu
Reply
#13
(Sep-12-2022, 12:02 AM)snippsat Wrote:
(Sep-11-2022, 08:23 PM)gabriel789 Wrote: when you say virtual environment you mean like virtualbox
Can say it similar but instead of creates a OS,it's make a new stand alone Python environment.
It's build into Python trough venv or there 3-party lib like Poetry.
Purpose of Python virtual environments is to create an isolated environment for Python projects,
means that each project can have its own dependencies,regardless of what dependencies OS Python or other project has.
Example.
# Make 
G:\div_code
λ python -m venv new_env
 
# Cd in
λ cd new_env\
 
# Activate
# Linux <source bin/activate>
G:\div_code\new_env
λ G:\div_code\new_env\Scripts\activate
 
# Install
(new_env) G:\div_code\new_env
λ pip install requests
Collecting requests ..... 
Successfully installed certifi-2020.12.5 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.3
 
# List packages in environment 
(new_env) G:\div_code\new_env
λ pip list
Package    Version
---------- ---------
certifi    2020.12.5
chardet    4.0.0
idna       2.10
pip        20.2.3
requests   2.25.1
setuptools 49.2.1
urllib3    1.26.3
 
# Show
(new_env) G:\div_code\new_env
λ pip show requests
Name: requests
Version: 2.25.1
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: g:\div_code\new_env\lib\site-packages
Requires: idna, certifi, chardet, urllib3

hello. My name is Gabriel and iam currently trying to learn python can you please help me in doing so can you also tell me what different programs are needed and how im to download them. im using linux ubuntu. please help
Reply
#14
(Sep-12-2022, 05:22 PM)gabriel789 Wrote: hello. My name is Gabriel and iam currently trying to learn python can you please help me in doing so can you also tell me what different programs are needed and how im to download them. im using linux ubuntu. please help
As you now use Ubuntu it come with Python installed.
You seems a little lost on most of the basic of this.
Here a test you can do from Terminal,i use Mint here but command are the same on Ubuntu.
# Test Python version installed error try: python3 -V
tom@tom-VirtualBox:~$ python -V
Python 3.10.5

# Test that pip install error try: pip3
tom@tom-VirtualBox:~$ pip -V
pip 22.0.4 from /home/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pip (python 3.10)

# list files
tom@tom-VirtualBox:~$ ls
hello.py  output.txt

# Example running Python(.py) file
tom@tom-VirtualBox:~$ python hello.py
hello world
Dos not pip or pip3 work do this.
# Update
sudo apt update
sudo apt -y upgrade

# Install pip3
sudo apt install -y python3-pip
Then test again
pip3 -V

When this work can eg install PyChram that you talk about.
sudo snap install [pycharm-professional|pycharm-community] --classic
Reply
#15
(Sep-12-2022, 06:19 PM)snippsat Wrote:
(Sep-12-2022, 05:22 PM)gabriel789 Wrote: hello. My name is Gabriel and iam currently trying to learn python can you please help me in doing so can you also tell me what different programs are needed and how im to download them. im using linux ubuntu. please help
As you now use Ubuntu it come with Python installed.
You seems a little lost on most of the basic of this.
Here a test you can do from Terminal,i use Mint here but command are the same on Ubuntu.
# Test Python version installed error try: python3 -V
tom@tom-VirtualBox:~$ python -V
Python 3.10.5

# Test that pip install error try: pip3
tom@tom-VirtualBox:~$ pip -V
pip 22.0.4 from /home/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pip (python 3.10)

# list files
tom@tom-VirtualBox:~$ ls
hello.py  output.txt

# Example running Python(.py) file
tom@tom-VirtualBox:~$ python hello.py
hello world
Dos not pip or pip3 work do this.
# Update
sudo apt update
sudo apt -y upgrade

# Install pip3
sudo apt install -y python3-pip
Then test again
pip3 -V

When this work can eg install PyChram that you talk about.
sudo snap install [pycharm-professional|pycharm-community] --classic

i had to install pip. i also tryed the installation of pycharm but the link doesent work
Reply
#16
(Sep-12-2022, 07:21 PM)gabriel789 Wrote:
(Sep-12-2022, 06:19 PM)snippsat Wrote: As you now use Ubuntu it come with Python installed.
You seems a little lost on most of the basic of this.
Here a test you can do from Terminal,i use Mint here but command are the same on Ubuntu.
# Test Python version installed error try: python3 -V
tom@tom-VirtualBox:~$ python -V
Python 3.10.5

# Test that pip install error try: pip3
tom@tom-VirtualBox:~$ pip -V
pip 22.0.4 from /home/tom/.pyenv/versions/3.10.5/lib/python3.10/site-packages/pip (python 3.10)

# list files
tom@tom-VirtualBox:~$ ls
hello.py  output.txt

# Example running Python(.py) file
tom@tom-VirtualBox:~$ python hello.py
hello world
Dos not pip or pip3 work do this.
# Update
sudo apt update
sudo apt -y upgrade

# Install pip3
sudo apt install -y python3-pip
Then test again
pip3 -V

When this work can eg install PyChram that you talk about.
sudo snap install [pycharm-professional|pycharm-community] --classic

i had to install pip. i also tryed the installation of pycharm but the link doesent work

i installed pycharm is there anything else i need to install
Reply
#17
(Sep-12-2022, 07:39 PM)gabriel789 Wrote: i installed pycharm is there anything else i need to install
Not now,look at Configure a Python interpreter.
Point path to your Python version in Setting the default interpreter.
Not sure of Path to Python do this.
which python3
Restart PyChram.
Try running some Python code.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I am confused with the key and value thing james1019 3 977 Feb-22-2023, 10:43 PM
Last Post: deanhystad
  Cannot get started standenman 4 1,222 Feb-22-2023, 05:25 PM
Last Post: standenman
  i making a terminal sign up website thing Kenrichppython 1 1,711 Nov-04-2021, 03:57 AM
Last Post: bowlofred
  use thing before self sylvanas 3 2,351 Jul-21-2021, 04:54 PM
Last Post: sylvanas
  Not able to make a specific thing pause in pygame cooImanreebro 4 3,231 Dec-13-2020, 10:34 PM
Last Post: cooImanreebro
  Can't even get started dr6 1 1,623 Aug-18-2020, 04:38 PM
Last Post: Larz60+
  Help with list thing please Yeyzon 1 2,061 Apr-19-2019, 07:51 AM
Last Post: snippsat
  Printing one thing from a list bidoofis 1 2,352 Feb-05-2019, 09:02 PM
Last Post: ichabod801
  Getting started mba_110 0 1,736 Jan-18-2019, 05:23 PM
Last Post: mba_110
  I found weird thing. catastrophe_K 1 2,104 Sep-29-2018, 09:59 AM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020