Repository: Qiskit/qiskit

Issue:
Errors while instaling qiskit on MacOs
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Information

- **Qiskit Terra version**: 0.10.4
- **Python version**: 3.7.3
- **Operating system**: MacOs 10.14.5

### What is the current behavior?

I've been following the installation process in the qiskit page as well as the one in github, however when I run the command `pip install qiskit` after activating the environment I get a bunch of errors. The full list of errors is this one:

```
> Building wheels for collected packages: qiskit, psutil, pyeda
>   Building wheel for qiskit (setup.py) ... error
>   ERROR: Complete output from command /anaconda3/envs/qiskitjorge/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-install-f63a960d/qiskit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-wheel-ifr7ejlw --python-tag cp37:
>   ERROR: running bdist_wheel
>   ----------------------------------------
>   ERROR: Failed building wheel for qiskit
>   Running setup.py clean for qiskit
>   Building wheel for psutil (setup.py) ... error
>   ERROR: Complete output from command /anaconda3/envs/qiskitjorge/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-install-f63a960d/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-wheel-5j25_18b --python-tag cp37:
>   ERROR: running bdist_wheel
>   running build
>   running build_py
>   creating build
>   creating build/lib.macosx-10.7-x86_64-3.7
>   creating build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_psaix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>   creating build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_contracts.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_connections.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/runner.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_unicode.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_aix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   copying psutil/tests/__main__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>   running build_ext
>   building 'psutil._psutil_osx' extension
>   creating build/temp.macosx-10.7-x86_64-3.7
>   creating build/temp.macosx-10.7-x86_64-3.7/psutil
>   creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch
>   creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch/osx
>   gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/qiskitjorge/include -arch x86_64 -I/anaconda3/envs/qiskitjorge/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_OSX=1 -I/anaconda3/envs/qiskitjorge/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.7-x86_64-3.7/psutil/_psutil_common.o
>   xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
>   error: command 'gcc' failed with exit status 1
>   ----------------------------------------
>   ERROR: Failed building wheel for psutil
>   Running setup.py clean for psutil
>   Building wheel for pyeda (setup.py) ... error
>   ERROR: Complete output from command /anaconda3/envs/qiskitjorge/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-install-f63a960d/pyeda/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-wheel-zvk_hpmy --python-tag cp37:
>   ERROR: running bdist_wheel
>   running build
>   running build_py
>   creating build
>   creating build/lib.macosx-10.7-x86_64-3.7
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda
>   copying pyeda/util.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda
>   copying pyeda/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda
>   copying pyeda/inter.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/bfarray.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/boolfunc.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/minimization.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/table.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/bdd.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   copying pyeda/boolalg/expr.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/logic
>   copying pyeda/logic/aes.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic
>   copying pyeda/logic/graycode.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic
>   copying pyeda/logic/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic
>   copying pyeda/logic/addition.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic
>   copying pyeda/logic/sudoku.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   copying pyeda/parsing/lex.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   copying pyeda/parsing/token.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   copying pyeda/parsing/pla.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   copying pyeda/parsing/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   copying pyeda/parsing/dimacs.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   copying pyeda/parsing/boolexpr.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/test
>   copying pyeda/test/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/test
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_espresso.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_table.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_bdd.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_bfarray.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_expr.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_picosat.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_exxpr.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   copying pyeda/boolalg/test/test_boolfunc.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/boolalg/test
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/logic/test
>   copying pyeda/logic/test/test_graycode.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic/test
>   copying pyeda/logic/test/test_addition.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic/test
>   copying pyeda/logic/test/test_sudoku.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic/test
>   copying pyeda/logic/test/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/logic/test
>   creating build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing/test
>   copying pyeda/parsing/test/test_pla.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing/test
>   copying pyeda/parsing/test/test_dimacs.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing/test
>   copying pyeda/parsing/test/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing/test
>   copying pyeda/parsing/test/test_boolexpr.py -> build/lib.macosx-10.7-x86_64-3.7/pyeda/parsing/test
>   running build_ext
>   building 'pyeda.boolalg.espresso' extension
>   creating build/temp.macosx-10.7-x86_64-3.7
>   creating build/temp.macosx-10.7-x86_64-3.7/thirdparty
>   creating build/temp.macosx-10.7-x86_64-3.7/thirdparty/espresso
>   creating build/temp.macosx-10.7-x86_64-3.7/thirdparty/espresso/src
>   creating build/temp.macosx-10.7-x86_64-3.7/pyeda
>   creating build/temp.macosx-10.7-x86_64-3.7/pyeda/boolalg
>   gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/qiskitjorge/include -arch x86_64 -I/anaconda3/envs/qiskitjorge/include -arch x86_64 -Ithirdparty/espresso/src -I/anaconda3/envs/qiskitjorge/include/python3.7m -c thirdparty/espresso/src/cofactor.c -o build/temp.macosx-10.7-x86_64-3.7/thirdparty/espresso/src/cofactor.o
>   xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
>   error: command 'gcc' failed with exit status 1
>   ----------------------------------------
>   ERROR: Failed building wheel for pyeda
>   Running setup.py clean for pyeda
> Failed to build qiskit psutil pyeda
> Installing collected packages: numpy, pylatexenc, marshmallow, marshmallow-polyfield, jsonschema, ply, psutil, decorator, networkx, mpmath, sympy, scipy, pillow, qiskit-terra, qiskit-aer, websockets, chardet, urllib3, idna, requests, ntlm-auth, asn1crypto, six, pycparser, cffi, cryptography, requests-ntlm, qiskit-ibmq-provider, qiskit-ignis, pyasn1, more-itertools, python-dateutil, pytz, pandas, inflection, pyOpenSSL, ndg-httpsclient, quandl, dlx, joblib, scikit-learn, fastdtw, pyeda, cvxopt, docloud, docplex, qiskit-aqua, h5py, pyscf, qiskit-chemistry, qiskit
>   Running setup.py install for psutil ... error
>     ERROR: Complete output from command /anaconda3/envs/qiskitjorge/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-install-f63a960d/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-record-y4iofvpf/install-record.txt --single-version-externally-managed --compile:
>     ERROR: running install
>     running build
>     running build_py
>     creating build
>     creating build/lib.macosx-10.7-x86_64-3.7
>     creating build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_psaix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
>     creating build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_contracts.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_connections.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/runner.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_unicode.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_aix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     copying psutil/tests/__main__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
>     running build_ext
>     building 'psutil._psutil_osx' extension
>     creating build/temp.macosx-10.7-x86_64-3.7
>     creating build/temp.macosx-10.7-x86_64-3.7/psutil
>     creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch
>     creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch/osx
>     gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/qiskitjorge/include -arch x86_64 -I/anaconda3/envs/qiskitjorge/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_OSX=1 -I/anaconda3/envs/qiskitjorge/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.7-x86_64-3.7/psutil/_psutil_common.o
>     xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
>     error: command 'gcc' failed with exit status 1
>     ----------------------------------------
> ERROR: Command "/anaconda3/envs/qiskitjorge/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-install-f63a960d/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-record-y4iofvpf/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/nt/5bb34r8j0sn3xj26r41f27jc0000gn/T/pip-install-f63a960d/psutil/
```

I have already updated both python and the operating system, even though they already matched the requirements qiskit page shows.

I want to use qiskit for research purpose but I can't use it until I have it installed on my computer. How can I fix this?

### Steps to reproduce the problem
Installation process on qiskit webpage


### What is the expected behavior?
Qiskit should be installed without any complications. 


### Suggested solutions





Discussion:
Hello! I think you might need to install the XCode developer tools (it looks like a similar error to [this](https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a)) which you can do by running `xcode-select --install` in a terminal.
Thanks for answering @maddy-tod . I did what you suggested and still got the same error message. 
So this is an issue with the pyeda requirement from aqua that requires building with a compiler. Qiskit is not supposed to require a compiler, so this needs to be addressed. 

I tried doing this on my wife’s computer and it worked once the command line tools were installed. What is the error you are getting now?
I reinstalled everything, including the xcode developer tools and now it works perfectly.

Getting an error with the credentials now, will post in a different issue. 

Thank you both. 

Resolving patch:
diff --git a/qiskit/compiler/scheduler.py b/qiskit/compiler/scheduler.py
--- a/qiskit/compiler/scheduler.py
+++ b/qiskit/compiler/scheduler.py
@@ -25,6 +25,7 @@
 from qiskit.providers.backend import Backend
 from qiskit.scheduler import ScheduleConfig
 from qiskit.scheduler.schedule_circuit import schedule_circuit
+from qiskit.tools.parallel import parallel_map
 
 logger = logging.getLogger(__name__)
 
@@ -97,7 +98,7 @@ def schedule(
 
     schedule_config = ScheduleConfig(inst_map=inst_map, meas_map=meas_map, dt=dt)
     circuits = circuits if isinstance(circuits, list) else [circuits]
-    schedules = [schedule_circuit(circuit, schedule_config, method) for circuit in circuits]
+    schedules = parallel_map(schedule_circuit, circuits, (schedule_config, method))
     end_time = time()
     _log_schedule_time(start_time, end_time)
     if arg_circuits_list:
diff --git a/qiskit/tools/parallel.py b/qiskit/tools/parallel.py
--- a/qiskit/tools/parallel.py
+++ b/qiskit/tools/parallel.py
@@ -57,23 +57,38 @@
 from qiskit.tools.events.pubsub import Publisher
 from qiskit import user_config
 
-CONFIG = user_config.get_config()
 
-if os.getenv("QISKIT_PARALLEL", None) is not None:
-    PARALLEL_DEFAULT = os.getenv("QISKIT_PARALLEL", None).lower() == "true"
-else:
+def get_platform_parallel_default():
+    """
+    Returns the default parallelism flag value for the current platform.
+
+    Returns:
+        parallel_default: The default parallelism flag value for the
+        current platform.
+
+    """
     # Default False on Windows
     if sys.platform == "win32":
-        PARALLEL_DEFAULT = False
+        parallel_default = False
     # On macOS default false on Python >=3.8
     elif sys.platform == "darwin":
         if sys.version_info[0] == 3 and sys.version_info[1] >= 8:
-            PARALLEL_DEFAULT = False
+            parallel_default = False
         else:
-            PARALLEL_DEFAULT = True
+            parallel_default = True
     # On linux (and other OSes) default to True
     else:
-        PARALLEL_DEFAULT = True
+        parallel_default = True
+
+    return parallel_default
+
+
+CONFIG = user_config.get_config()
+
+if os.getenv("QISKIT_PARALLEL", None) is not None:
+    PARALLEL_DEFAULT = os.getenv("QISKIT_PARALLEL", None).lower() == "true"
+else:
+    PARALLEL_DEFAULT = get_platform_parallel_default()
 
 # Set parallel flag
 if os.getenv("QISKIT_IN_PARALLEL") is None:


Test patch:
diff --git a/qiskit/test/base.py b/qiskit/test/base.py
--- a/qiskit/test/base.py
+++ b/qiskit/test/base.py
@@ -30,6 +30,7 @@
 import unittest
 from unittest.util import safe_repr
 
+from qiskit.tools.parallel import get_platform_parallel_default
 from qiskit.utils import optionals as _optionals
 from .decorators import enforce_subclasses_call
 from .utils import Path, setup_test_logging
@@ -144,6 +145,24 @@ def assertDictAlmostEqual(
             msg = self._formatMessage(msg, error_msg)
             raise self.failureException(msg)
 
+    def enable_parallel_processing(self):
+        """
+        Enables parallel processing, for the duration of a test, on platforms
+        that support it. This is done by temporarily overriding the value of
+        the QISKIT_PARALLEL environment variable with the platform specific default.
+        """
+        parallel_default = str(get_platform_parallel_default()).upper()
+
+        def set_parallel_env(name, value):
+            os.environ[name] = value
+
+        self.addCleanup(
+            lambda value: set_parallel_env("QISKIT_PARALLEL", value),
+            os.getenv("QISKIT_PARALLEL", parallel_default),
+        )
+
+        os.environ["QISKIT_PARALLEL"] = parallel_default
+
 
 class QiskitTestCase(BaseQiskitTestCase):
     """Terra-specific extra functionality for test cases."""
diff --git a/test/python/compiler/test_scheduler.py b/test/python/compiler/test_scheduler.py
new file mode 100644
--- /dev/null
+++ b/test/python/compiler/test_scheduler.py
@@ -0,0 +1,94 @@
+# This code is part of Qiskit.
+#
+# (C) Copyright IBM 2022.
+#
+# This code is licensed under the Apache License, Version 2.0. You may
+# obtain a copy of this license in the LICENSE.txt file in the root directory
+# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
+#
+# Any modifications or derivative works of this code must retain this
+# copyright notice, and modified files need to carry a notice indicating
+# that they have been altered from the originals.
+
+"""Scheduler Test."""
+
+from qiskit.circuit import QuantumRegister, ClassicalRegister, QuantumCircuit
+from qiskit.exceptions import QiskitError
+from qiskit.pulse import InstructionScheduleMap, Schedule
+from qiskit.test import QiskitTestCase
+from qiskit.test.mock import FakeOpenPulse3Q
+from qiskit.compiler.scheduler import schedule
+
+
+class TestCircuitScheduler(QiskitTestCase):
+    """Tests for scheduling."""
+
+    def setUp(self):
+        super().setUp()
+        qr = QuantumRegister(2, name="q")
+        cr = ClassicalRegister(2, name="c")
+        self.circ = QuantumCircuit(qr, cr, name="circ")
+        self.circ.cx(qr[0], qr[1])
+        self.circ.measure(qr, cr)
+
+        qr2 = QuantumRegister(2, name="q")
+        cr2 = ClassicalRegister(2, name="c")
+        self.circ2 = QuantumCircuit(qr2, cr2, name="circ2")
+        self.circ2.cx(qr2[0], qr2[1])
+        self.circ2.measure(qr2, cr2)
+
+        self.backend = FakeOpenPulse3Q()
+        self.backend_config = self.backend.configuration()
+        self.num_qubits = self.backend_config.n_qubits
+
+    def test_instruction_map_and_backend_not_supplied(self):
+        """Test instruction map and backend not supplied."""
+        with self.assertRaisesRegex(
+            QiskitError,
+            r"Must supply either a backend or InstructionScheduleMap for scheduling passes.",
+        ):
+            schedule(self.circ)
+
+    def test_instruction_map_and_backend_defaults_unavailable(self):
+        """Test backend defaults unavailable when backend is provided, but instruction map is not."""
+        self.backend._defaults = None
+        with self.assertRaisesRegex(
+            QiskitError, r"The backend defaults are unavailable. The backend may not support pulse."
+        ):
+            schedule(self.circ, self.backend)
+
+    def test_measurement_map_and_backend_not_supplied(self):
+        """Test measurement map and backend not supplied."""
+        with self.assertRaisesRegex(
+            QiskitError,
+            r"Must supply either a backend or a meas_map for scheduling passes.",
+        ):
+            schedule(self.circ, inst_map=InstructionScheduleMap())
+
+    def test_schedules_single_circuit(self):
+        """Test scheduling of a single circuit."""
+        circuit_schedule = schedule(self.circ, self.backend)
+
+        self.assertIsInstance(circuit_schedule, Schedule)
+        self.assertEqual(circuit_schedule.name, "circ")
+
+    def test_schedules_multiple_circuits(self):
+        """Test scheduling of multiple circuits."""
+        self.enable_parallel_processing()
+
+        circuits = [self.circ, self.circ2]
+        circuit_schedules = schedule(circuits, self.backend, method="asap")
+        self.assertEqual(len(circuit_schedules), len(circuits))
+
+        circuit_one_schedule = circuit_schedules[0]
+        circuit_two_schedule = circuit_schedules[1]
+
+        self.assertEqual(
+            circuit_one_schedule,
+            schedule(self.circ, self.backend, method="asap"),
+        )
+
+        self.assertEqual(
+            circuit_two_schedule,
+            schedule(self.circ2, self.backend, method="asap"),
+        )
diff --git a/test/python/tools/test_parallel.py b/test/python/tools/test_parallel.py
--- a/test/python/tools/test_parallel.py
+++ b/test/python/tools/test_parallel.py
@@ -14,7 +14,9 @@
 import os
 import time
 
-from qiskit.tools.parallel import parallel_map
+from unittest.mock import patch
+
+from qiskit.tools.parallel import get_platform_parallel_default, parallel_map
 from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
 from qiskit.pulse import Schedule
 from qiskit.test import QiskitTestCase
@@ -37,6 +39,36 @@ def _build_simple_schedule(_):
     return Schedule()
 
 
+class TestGetPlatformParallelDefault(QiskitTestCase):
+    """Tests get_parallel_default_for_platform."""
+
+    def test_windows_parallel_default(self):
+        """Verifies the parallel default for Windows."""
+        with patch("sys.platform", "win32"):
+            parallel_default = get_platform_parallel_default()
+            self.assertEqual(parallel_default, False)
+
+    def test_mac_os_supported_version_parallel_default(self):
+        """Verifies the parallel default for macOS."""
+        with patch("sys.platform", "darwin"):
+            with patch("sys.version_info", (10, 11, 0, "final", 0)):
+                parallel_default = get_platform_parallel_default()
+                self.assertEqual(parallel_default, True)
+
+    def test_mac_os_unsupported_version_parallel_default(self):
+        """Verifies the parallel default for macOS."""
+        with patch("sys.platform", "darwin"):
+            with patch("sys.version_info", (3, 8, 0, "final", 0)):
+                parallel_default = get_platform_parallel_default()
+                self.assertEqual(parallel_default, False)
+
+    def test_other_os_parallel_default(self):
+        """Verifies the parallel default for Linux and other OSes."""
+        with patch("sys.platform", "linux"):
+            parallel_default = get_platform_parallel_default()
+            self.assertEqual(parallel_default, True)
+
+
 class TestParallel(QiskitTestCase):
     """A class for testing parallel_map functionality."""