OSError: [Errno 8] Exec format error with updated anaconda

Hello, I was recently having issues with anaconda so I uninstalled and reinstalled using the latest version (Anaconda3-2021.05-MacOSX-x86_64.pkg). This led to me having to re-make my FEniCS environment from scratch, and I am now getting a very strange error when I try to run one of my scripts:

(fenics) paigebrimley@ NO3RR-adaptation % python MPNP_NO3RR_EDL_v3.py
/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/pkg-config: line 36: /Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-cc: cannot execute binary file
/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/pkg-config: line 37: /Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-cc: cannot execute binary file
/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/pkg-config: line 48: /Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-cc: cannot execute binary file
/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/pkg-config: line 36: /Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-cc: cannot execute binary file
/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/pkg-config: line 37: /Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-cc: cannot execute binary file
/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/pkg-config: line 48: /Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-cc: cannot execute binary file
/Users/paigebrimley/Desktop/Research/Transport-Modeling/NO3RR_GMPNP/NO3RR-adaptation/utilities/1D_variable_50um_mesh_5990.xml.gz
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Traceback (most recent call last):
  File "MPNP_NO3RR_EDL_v3.py", line 1212, in <module>
    dry_run=args.dry_run
  File "MPNP_NO3RR_EDL_v3.py", line 353, in solve_EDL
    V = FunctionSpace(mesh, element)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dolfin/function/functionspace.py", line 31, in __init__
    self._init_from_ufl(*args, **kwargs)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dolfin/function/functionspace.py", line 43, in _init_from_ufl
    mpi_comm=mesh.mpi_comm())
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dolfin/jit/jit.py", line 47, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dolfin/jit/jit.py", line 97, in ffc_jit
    return ffc.jit(ufl_form, parameters=p)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/ffc/jitcompiler.py", line 217, in jit
    module = jit_build(ufl_object, module_name, parameters)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/ffc/jitcompiler.py", line 133, in jit_build
    generate=jit_generate)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dijitso/jit.py", line 165, in jit
    header, source, dependencies = generate(jitable, name, signature, params["generator"])
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/ffc/jitcompiler.py", line 76, in jit_generate
    dep_module_name = jit(dep, parameters, indirect=True)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/ffc/jitcompiler.py", line 217, in jit
    module = jit_build(ufl_object, module_name, parameters)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/ffc/jitcompiler.py", line 133, in jit_build
    generate=jit_generate)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dijitso/jit.py", line 178, in jit
    params)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dijitso/build.py", line 153, in build_shared_library
    status, output = get_status_output(cmd)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/site-packages/dijitso/system.py", line 41, in _get_status_output_subprocess
    stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/Users/paigebrimley/opt/anaconda3/envs/fenics/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/paigebrimley/opt/anaconda3/envs/fenics/bin/x86_64-conda-linux-gnu-c++'

Some research I did showed that an “OSError: [Errno 8] Exec format error” error can be caused by not having a shebang script at the top of the script, however I do have one included:

#!/usr/bin/env python3
# -*- coding: utf-8 -*- 

I had no issues before updating anaconda, so I’m not sure if this error has to do with my environment, python version (3.7 in this environment), or new installation of anaconda. Thanks!