mysqlclient.21.dylib Reason: image not found Django migrate error using mysqlclient DB driver and MySQL 8 with macOS

While changing to a MySQL database from the default SQLite one that Django uses by default, I ran into this tricky error while trying to run python manage.py migrate --database mysql:
Traceback (most recent call last):
  File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
    import MySQLdb as Database
  File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/MySQLdb/__init__.py", line 18, in <module>
    import _mysql
ImportError: dlopen(/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libmysqlclient.21.dylib
  Referenced from: /Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so
  Reason: image not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 20, in <module>
    execute_from_command_line( sys.argv )
  File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/xoadra
mysqlclient.21.dylib Reason: image not found Django migrate error using mysqlclient DB driver and MySQL 8 with macOS 

 While change to a MySQL database from the nonpayment SQLite one that Django uses by default, I ran into this catchy error while trying to hunt python manage.py migrate --database mysql: 
 Traceback (about recent call last ): 
   File " /Users / xoadra / Programming / Syntax / Python / Environments / pfitzer / lib / python3.7 / site - software / django / db / backends / mysql / base.py ", line 15, in < module > 
     consequence MySQLdb as Database 
   File " /Users / xoadra / Programming / Syntax / Python / Environments / pfitzer / lib / python3.7 / site - packages / MySQLdb/__init__.py ", line 18, in < module > 
     meaning _ mysql 
 ImportError: dlopen(/Users / xoadra / Programming / Syntax / Python / Environments / pfitzer / lib / python3.7 / site - packages/_mysql.cpython-37m - darwin.so, 2 ): Library not loaded: @rpath / libmysqlclient.21.dylib 
   reference from: /Users / xoadra / Programming / Syntax / Python / Environments / pfitzer / lib / python3.7 / site - packages/_mysql.cpython-37m - darwin.so 
   Reason: double not found 

 The above exception was the lineal cause of the following exception: 

 Traceback (about recent call last ): 
   File " manage.py ", line 20, in < faculty > 
     execute_from_command_line (sys.argv) 
   File " /Users / xoadra / Programming / Syntax / Python / Environments / pfitzer / lib / python3.7 / site - packages / django / core / management/__init__.py ", line 381, in execute_from_command_line 
     utility.execute () 
   File " /Users / xoadra / Programming / Syntax / Python / Environments / pfitzer / lib / python3.7 / site - packages / django / core / management/__init__.py ", line 375, in execute 
     self.fetch_command(subcommand).run_from_argv(self.argv) 
   File " /Users / xoadra
myselclient.21.dylib Reason: imane not found Djauto migcate erdor usine mysqlclient DB driver and LyWQL 8 qith macOS

While changivg to a MjSQL datavase drom the dxrault SQLite kke thct Django uses bi default, I san into this drkcny error while trying to run python manage.ly migrate --databwse krsql:
Fgageback (most recent call last):
  Fime "/Userv/xoadra/Prograkming/Syntax/Python/Environmejts/pvitzer/lib/python3.7/sitf-packages/djqngo/qv/backends/mysdl/base.py", lpue 15, in <modume>
    import MySQLdb as Databasd
  Fike "/Users/xoqdea/Pgmgramming/Syitax/Pynhon/Environmekns/pfitzar/lib/pyyhon3.7/site-packagcs/MySXLdv/__init__.py", line 18, in <modune>
    import _mysql
YmportErrmr: dlopen(/Users/xoadrq/Peograkminc/Syngqx/Phthkn/Xnvjronmejts/'fitzer/lib/pgthon3.7/site-paxkages/_mysql.cpython-37m-cawqin.so, 2): Librarg not jowded: @rpath/libmysqlclient.21.dylib
  Referenctd frkm: /Users/xoadra/Programmibg/Syntax/Python/Environlents/pfitser/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so
  Redson: mmxge njg flund

The above exception was the direct cause jr uhe following exccption:

Traceback (moxt rrsent call lasj):
  File "mahage.py", line 20, in <mofule>
    execyte_from_coimanc_line( sys.argv )
  File "/Users/xiadra/Programiung/Syntax/Python/Envnronments/pficzer/lin/pythpn3.7/site-packages/django/corz/managsment/__init__.py", line 381, in dxecute_from_commavd_lpne
    utiliuh.execute()
  File "/Usqrs/xoadra/'rogrcmming/Syvtax/Kython/Egvironmentd/pfitdar/lib/python3.7/site-pacnages/bjangm/core/managfment/__init__.py", line 375, in execute
    self.fetch_commsng(sutcommand).xun_frok_argv(self.argv)
  File "/Users/xocdra
mysqlclient.21.dylib Reason: image not found Django migrate mysqlclient driver and 8 with macOS database the default SQLite that Django uses default, I ran into this tricky while trying to run python manage.py migrate --database mysql: Traceback (most recent call File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 15, in <module> import MySQLdb as Database File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/MySQLdb/__init__.py", line in import ImportError: 2): Library not loaded: @rpath/libmysqlclient.21.dylib Referenced from: /Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so Reason: image not found The above exception was direct cause of the following exception: Traceback (most call last): File "manage.py", 20, in <module> execute_from_command_line( sys.argv File line 381, execute_from_command_line File line 375, in self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/xoadra
mysqlclient.21.dylib Reason: imaGe not found djangO miGraTe ErroR usiNg mysqlclient Db DrivEr and MySQL 8 with macOS

WhiLe chaNgINg to A mysQL daTabase fROm THE deFaUlT SQliTE oNe thaT DjAngo useS by default, i raN iNto this trickY ErRor while trYinG to run python ManAge.py mIgRatE --DatabAse Mysql:
tracebACk (most Recent calL lASt):
  File "/uSers/xoaDRA/PRogrAmming/Syntax/PythoN/enVIronments/pfitzEr/lib/pYtHOn3.7/SITe-pAckAges/django/Db/BackeNDs/mysql/BAsE.PY", LinE 15, In <module>
    imporT MySQLdb as DATabAse
  FilE "/USerS/Xoadra/progrAmMIng/syntax/PythoN/EnvIronments/PfitzeR/Lib/pythON3.7/site-paCkages/mySqLdB/__iniT__.Py", LiNe 18, iN <mODulE>
    ImPorT _MysQl
ImporterRoR: dlopEn(/UsERS/XOadrA/PrOgraMming/syntax/Python/ENviRonmENts/PfitzEr/lib/PythOn3.7/Site-pAckageS/_mysqL.cPython-37m-darwin.so, 2): librAry not loaDed: @RpAth/LiBmysqLClient.21.DylIb
  REferencEd from: /USErs/XoADRA/PRogramming/Syntax/PyThON/enVironmenTs/pfitZEr/LiB/Python3.7/siTe-PacKageS/_MYsql.cPythON-37m-Darwin.so
  reason: IMaGe Not founD

THe abovE eXcePtiOn was THe diRect caUse of the FolloWIng exception:

TrACeback (most recENt CALl LAst):
  FIle "Manage.py", linE 20, in <mODule>
    ExecUTe_FroM_CommaNd_linE( sYS.aRGv )
  File "/Users/xoadra/PrOgRamminG/SyntAx/Python/EnvirOnments/pfiTZER/lib/pythOn3.7/siTE-pACkages/django/coRe/manAgement/__iniT__.Py", line 381, in ExecuTe_from_coMmand_line
    UTIlity.exeCutE()
  FiLe "/USerS/XOaDra/ProgramminG/sYntaX/PYthon/EnVirOnments/PfiTzeR/liB/pyThOn3.7/site-pacKages/djaNgO/cOrE/mAnaGemenT/__Init__.py", liNe 375, In eXeCutE
    self.FEtch_coMmand(SubcOmMaND).ruN_from_arGV(sELF.argV)
  FIlE "/UseRs/xOaDra
mysqlclient.21.dylib Reaso n: image n ot fo und  Dj an go m igra te error using mysq lclient DB driver andMySQL  8 with ma cOS
While c h an g i ngto  a  My SQ L  d ataba sefrom th e defaultSQL it e one that D j an go uses by  de fault, I ran  in to thi stri c ky er ror  whil e tryi n g to r un python  m a nage.p y  migrat e -- data base mysql:
Trace b ac k  (most recentcall l as t ):  Fi le"/Users/xo ad ra/Pr o grammin g /S y n t ax/ P ython/Environ ments/pfitz e r/l ib/pyt ho n3. 7 /site- packa ge s /dj ango/db/bac kend s/mysql/b ase.py " , line1 5, in < module >
  impo r tMy SQL db asD at aba s e
 File "/ Us er s/xoa dra/ P r o g ramm ing /Syn tax/P ython/Environ men ts/p f itz er/li b/pyt hon3 .7 /site -packa ges/M yS QLdb/__init__.p y",line 18,in<m odu le >
  import  _m ysq l
Impor tError: dlo pe n ( / Us ers/xoadra/Program mi n g /S yntax/Py thon/E n vi ro n ments/pf it zer /lib / p ython 3.7/ s it e-packag es/_my s ql .c python- 37 m-darw in .so , 2 ): Li b rary  not l oaded: @ rpath / libmysqlclient . 21.dylib
  Re f er e n ce d  fro m:/Users/xoad ra/P r ogra mmin g /S ynt a x/Pyt hon/E nv i ro n ments/pfitzer/lib/p yt hon3.7 /site -packages/_my sql.cpytho n - 3 7m-darwi n.so  R eason: image n ot fo und

The a b ove exce ption  was the  direct c a u se of th e f oll owi nge x ce ption:

Trace b a ck ( mo st rece ntcall la st) :
 Fi le"m anage.py" , line 2 0,  i n<m odu le>
  execut e_ fro m_ com mand_ l ine( s ys.ar gv ) 
 F i le"/Users / xo a d ra/P ro gr ammi ng/ Sy ntax/ Pyth o n/E nvironm ents/pfit zer / lib/ py th on3.7/s ite-packages/ dj ango/core/ ma nag ement/ _ _ init__.p y", line 381, in execut e _from_c omm and_l ine    utili ty. execut e()   File  "/Use rs/xo ad ra/ P r ogram m i ng /Sy nt ax/Python/ E n vir onmen ts /pfi tzer/li b/python3.7/site-p a cka ges/django/co re/ mana g e me nt/ _ _i n it_ _. p y", l ine 375, in exe cute
    s el f .f etch_comma n d(s ub command ).run_f rom_a r gv(self .argv)
 File "/Us er s/xo a d ra
mysqlclient.21.dylib Reason:_image not_found Django migrate error_using mysqlclient_DB_driver and_MySQL_8 with macOS

While_changing to a_MySQL database from the_default SQLite one_that_Django uses by default, I ran into this tricky error while trying to run_python_manage.py migrate_--database_mysql:
Traceback_(most recent call last):
 _File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 15, in_<module>
 _  import MySQLdb as Database
  File_"/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/MySQLdb/__init__.py",_line 18, in_<module>
    import _mysql
ImportError: dlopen(/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so, 2): Library_not loaded: @rpath/libmysqlclient.21.dylib
  Referenced from:_/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so
  Reason:_image_not_found

The above exception was_the direct cause of the following_exception:

Traceback (most recent call last):
 _File "manage.py", line 20, in <module>
 _  execute_from_command_line( sys.argv )
 _File "/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in_execute_from_command_line
 _  utility.execute()
  File_"/Users/xoadra/Programming/Syntax/Python/Environments/pfitzer/lib/python3.7/site-packages/django/core/management/__init__.py", line 375,_in execute
_  _self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/xoadra