top of page
  • Writer's pictureT3B

How I fixed my Python install

You know I’ve been messing around in Python all year.


Well, I went digging into source files and screwed everything up...

Due to the release of GitHub CoPilot, I switched my IDE from pycharm to visual studio code. After I got used to the new interface, any library imports weren’t working (/matplotlib, numpy/, etc).


I had to browse the web for various fixes and re-installation so posting it here incase it helps someone else:


STEP 1 - Reset


Reinstall Mac iOS - Launch in recovery mode and reinstall to HD.


TROUBLESHOOT: Check login shell is: /bin/zsh

FIX: System Settings> Users & Groups > (Right Click User) Advanced Options


STEP 2 - Install Python


TROUBLESHOOT: No Python Installed

FIX: Download From website and follow instructions. https://www.python.org/downloads/


Open Terminal and run:

python —version

to check it’s installed successfully.


TERMINAL ERROR: xcrun: error: invalid active developer path

FIX: Update/ Install Xcode.


Open Terminal and run:

xcode-select —install

STEP 3 - Install Pip


TROUBLESHOOT: No pip. (Need this to install other libraries)

FIX: Install Pip


Open Terminal and run:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Run:

python3 get-pip.py

Check it’s installed successfully and run:

pip3 —version
pip —version


STEP 4 - Install Matplotlib


TROUBLESHOOT: No Matplotlib

FIX: Install Matplotlib


Open Terminal and run:


pip install matplotlib

TROUBLESHOOT: Needs Certifi

FIX: Install Certificates [https://pypi.org/project/certifi/]


Open Terminal and run:


pip install certifi

---


I hope this also works for you.


T3B


5 views0 comments
bottom of page