Learn Python for using in the following domains:
- Object Oriented Programming (OOP), Functional Programming (FP)
- Data Science
- Machine Learning
- Web Development
- Chatbot
- Editor (with suggestion): Sublime Text 3 (Crack version with setup), suggestion
- Interpreter
- Anaconda (on Windows)
- Python3 (on Linux (Ubuntu)) (If required)
-
[Linux (Ubuntu)]:
sudo apt install python3- And use
pipas package manager. Installcondausing this.
NOTE: Why not Anaconda in Linux?
- If already installed in Windows, & Linux is running on WSL. Then, try using anaconda in Windows, so that it will not add (so many approx. 600 MB of) packages additionally in the PC/Laptop.
- Anaconda is mainly installed because of built-in IDEs like Jupyter notebook, Spyder.
- Also, both
conda&pippackage manager comes alongwith.
- And use
-
Jupyter Notebook by Anaconda (used mostly in debugging each module)
-
Sublime text 3 (Install conda packages after Anaconda installation) - Excel-python (with xlwings), Dash (Dashboard), Django (Web App)
Note: It depends on the project. If it consists of multiple dependent python files, then use ST3, otherwise use Jupyter Notebook.
- python3 comes pre-installed in macOS via Developer CommandLineTools. Check using
$ python3 --versioncommand. Now, needs to superimpose using the python ofbrew.- Using
brew,$ brew install [email protected], we can have multiple python versions:python3.12orpython3.11etc. - Update:
$ brew upgrade [email protected]to update python3.11. Similarly,$ brew upgrade [email protected]for python3.12.
- Using
- Install
pip(akapip3for some python versions > 3) using your preferredpython3version.
python3.11 -m pip install --upgrade pipIt is recommended to install the packages using
pip3(notconda) (akapip). And then check if installed usingpip3 listorpip list.
In order to know which python3 version is linked to which pip or pip3, use $ pip --version or $ pip3 --version command.
This is the result in my case:
$ which pip
/opt/homebrew/bin/pip
$ pip --version ⏎
pip 24.0 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)
$ which pip3
/opt/homebrew/bin/pip3
$ pip3 --version
pip 24.0 from /opt/homebrew/lib/python3.12/site-packages/pip (python 3.12)This means pip is installed via python3.11 (via brew). So, install/update via python3.11.
-
Project Management tool:
huakis recommended, butpoetryis also good, but 10x slow. -
Editor: VSC (Visual Studio Code)
-
Enable Auto-complete suggestion: For enabling autocomplete suggestion, add this line in
settings.json:
"python.analysis.autoImportCompletions": true,
"python.analysis.extraPaths": ["/opt/homebrew/lib/python3.11/site-packages"]To uninstall, follow this:
- Open terminal on
~directory. - Run
conda install anaconda-clean - Run
anaconda-clean --yes - Run
rm -rf ~/opt/anaconda3 - Close and reopen your terminal to refresh it. You should no longer see
(base)in your terminal prompt.
I don't use it anymore.
- Anaconda installed & added to PATH in Windows.
- Packages
- Build system
- default
- Snippet
- None
Visual Studio Code [RECOMMENDED]
- pandas
- xlwings
- matplotlib
- plotly
- Formatter:
ruff,black,autopep8,yapf
Error executing Jupyter command 'lab': [WinError 5] Access is denied-
Cause: As the jupyterlab is not installed as Admin during the Anaconda installation. That's why need to be either followed: M-1 or M-2.
-
Solution:
- M-1:
python3 -m jupyterlab
- M-2:
step-1: open your anaconda navigator step-2: click on jupyter lab setting option and then remove it step-3: Now open your anaconda prompt and type the following command `conda install -c conda-forge jupyterlab1
- Reason: This error is when importing package from anaconda packages on macOS. As the package is not installed in the
pipenvironment, but incondaenvironment,python3is not able to find the package. - Solution:
- M-1: Install the package in
pipenvironment. - [RECOMMENDED] M-2: If using
zsh, edit~/.zshrc& add this line:
- M-1: Install the package in
# import python packages from Anaconda rather than system python
export PATH="$HOME/opt/anaconda3/bin/:$PATH"Now, you can import the package successfully inside Jupyter Notebook & also in a separate python file.
- Reason: When using jupyter notebook on macOS, it shows the following error:
No kernel found-
Solution:
- M-1: Install the kernel for the python version you are using. For example, if using python3.9, then install the kernel for python3.9.
python3.9 -m pip install ipykernel
- M-2: Connect to a already running jupyter notebook kernel. Just run
$ jupyter notebookcommand in the directory where the notebook is present.
- Python Algorithms - https://github.com/TheAlgorithms/Python
- HackerRank Problems and Solutions - https://github.com/juhilsomaiya/HackerRank-Python-Algorithm-Solution
- Plotly Offline Charts - https://github.com/SayaliSonawane/Plotly_Offline_Python
- Plotly Dashboards with Dash - https://github.com/Pierian-Data/Plotly-Dashboards-with-Dash
- Plotly Datasets - https://github.com/plotly/datasets
- Dash plotly recipes (for discussion forum) - https://github.com/plotly/dash-recipes
- Pandas Exercises - https://github.com/guipsamora/pandas_exercises
- Zulip (powerful open source team chat) - https://github.com/zulip/zulip
- Code Beautify (into Image) - LINK
- Dash Bootstrap Components - https://dash-bootstrap-components.opensource.faculty.ai/
- Automate docs with Python - Documentation, Github, pip, Example
- Automate PPT with Python - Documentation, Github, pip
- Python Geocoding Toolbox (location, coordinates, address, street, city, country) - pip, example
- Geocoding and reverse geocoding using Python - https://chrisalbon.com/python/data_wrangling/geocoding_and_reverse_geocoding/
- Beautiful formatting in Console - https://github.com/willmcgugan/rich
- Learning Python through test-driven development of games and puzzles - https://github.com/kyclark/tiny_python_projects
- Open source home automation that puts local control and privacy first - https://github.com/home-assistant/core
- Apprise - Push Notifications that work with just about every platform! - https://github.com/caronc/apprise
- Dash Plotly - https://dash.plot.ly/
- Django with Dash - Online Documentation, pip
- Python all charts - https://python-graph-gallery.com/