def METHOD_NAME(self, remove=False):
    """Create a command to run in julia to install an julia package."""
    install_opts = ""
    if self.cfg['installopts']:
        install_opts = self.cfg['installopts']
    else:
        install_opts = "name=\"%s\", version=\"%s\"" % (self.package_name, self.version)
    pre_cmd = '%s unset EBJULIA_USER_DEPOT_PATH && unset EBJULIA_ADMIN_DEPOT_PATH && export JULIA_DEPOT_PATH=%s && export JULIA_PROJECT=%s' % (self.cfg['preinstallopts'], self.depot, self.projectdir)
    has_mpi = False
    if self.toolchain.options.get('usempi', None):
        has_mpi = True
    if (self.cfg['mpiexec'] or self.cfg['mpiexec_args']) and not has_mpi:
        raise EasyBuildError("When enabling building with mpi, also enable the 'usempi' toolchain option.")
    if self.toolchain.toolchain_family() in [toolchain.CPE, toolchain.CRAYPE] and has_mpi:
        cray_mpich_dir = os.getenv('CRAY_MPICH_DIR', '')
        pre_cmd += ' && export JULIA_MPI_BINARY=system'
        pre_cmd += ' && export JULIA_MPI_PATH="%s"' % cray_mpich_dir
        pre_cmd += ' && export JULIA_MPICC="cc"'
    if self.cfg['mpiexec']:
        pre_cmd += ' && export JULIA_MPIEXEC="%s"' % self.cfg['mpiexec']
    if self.cfg['mpiexec_args']:
        pre_cmd += ' && export JULIA_MPIEXEC_ARGS="%s"' % self.cfg['mpiexec_args']
    if self.cfg['arch_name'] == 'gpu':
        pre_cmd += ' && export JULIA_CUDA_USE_BINARYBUILDER=false'
    if remove:
        cmd = ' && '.join([pre_cmd, "julia --eval 'using Pkg; Pkg.rm(PackageSpec(%s))'" % install_opts])
    else:
        cmd = ' && '.join([pre_cmd, "julia --eval 'using Pkg; Pkg.add(PackageSpec(%s))'" % install_opts])
    return cmd