Python Forum
Need help i just started the whole thing - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Need help i just started the whole thing (/thread-38118.html)

Pages: 1 2


RE: Need help i just started the whole thing - snippsat - Sep-12-2022

(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



RE: Need help i just started the whole thing - gabriel789 - Sep-12-2022

can you send me all information and how to download all necessary files. Im currently using Ubuntu


RE: Need help i just started the whole thing - gabriel789 - Sep-12-2022

(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


RE: Need help i just started the whole thing - snippsat - Sep-12-2022

(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



RE: Need help i just started the whole thing - gabriel789 - Sep-12-2022

(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


RE: Need help i just started the whole thing - gabriel789 - Sep-12-2022

(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


RE: Need help i just started the whole thing - snippsat - Sep-12-2022

(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.