Skip to content

EzzalddeenAli/My_Learning-Python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My_learning-Python

Learn Python:

  • Object Oriented Programming (OOP), Functional Programming (FP)

  • Data Science

  • Machine Learning

  • Web Development

  • Chatbot

Installation

Windows (with WSL Ubuntu)

  • Editor (with suggestion): Sublime Text 3 (Crack version with setup), suggestion
  • Interpreter
    • Anaconda (on Windows)
    • Python3 (on Linux (Ubuntu)) (If required)

Linux

  • [Linux (Ubuntu)]: sudo apt install python3

    • And use pip as package manager. Install conda using 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 & pip package manager comes alongwith.
  • 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.

macOS

Installation

  • Install Anaconda
  • package manager: conda, pip3. All the packages are installed in this folder $HOME/opt/anaconda3/bin/python3.7/site-packages/

    It is recommended to install the packages using pip3 & then it would show in conda list as well along with pip3 list.

  • Editor: VSC (Visual Studio Code) with Python, Jupyter extension packages.

Uninstallation

  1. Open terminal on ~ directory.
  2. Run conda install anaconda-clean
  3. Run anaconda-clean --yes
  4. Run rm -rf ~/opt/anaconda3
  5. Close and reopen your terminal to refresh it. You should no longer see (base) in your terminal prompt.

Editors

Sublime Text 3

  • For Python, ST3 is recommended for editing.
  • Anaconda installed & added to PATH in Windows.
  • Packages
  • Build system
    • default
  • Snippet
    • None

Tools

Anaconda #packagemanager

Pip #packagemanager

Libraries

pandas #package

xlwings #package

matplotlib #package

Troubleshooting

1. Error while opening jupyterlab on cmd

Error executing Jupyter command 'lab': [WinError 5] Access is denied
- Reason: 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 1
python -m jupyterlab
- Solution 2
step1: open your anaconda navigator
step2: click on jupyter lab setting option and then remove it
step2: Now open your anaconda prompt and type the following command "conda install -c conda-forge jupyterlab"

2. moduleNotFoundError: No module named '...' on macOS

  • Reason: This error is when importing package from anaconda packages on macOS. As the package is not installed in the pip environment, but in conda environment, python3 is not able to find the package.
  • Solution:
    • M-1: Install the package in pip environment.
    • [RECOMMENDED] M-2: If using zsh, edit ~/.zshrc & add this line:
# 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.

3. Jupyter kernel issue on macOS

  • 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 notebook command in the directory where the notebook is present.

Github Repos.

Data Visualization

References

TODO

Code



About

Learn Python - Excel, Pandas, Matplotlib, Xlwings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 99.2%
  • Other 0.8%