<p dir="auto">Consider the following code from <code class="notranslate">numpy/distutils/fcompiler/gnu.py</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="                import sysconfig
                target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
                if not target:
                    target = '10.9'
                    s = f'Env. variable MACOSX_DEPLOYMENT_TARGET set to {target}'
                    warnings.warn(s, stacklevel=2)
                os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
"><pre class="notranslate"><code class="notranslate">                import sysconfig
                target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
                if not target:
                    target = '10.9'
                    s = f'Env. variable MACOSX_DEPLOYMENT_TARGET set to {target}'
                    warnings.warn(s, stacklevel=2)
                os.environ['MACOSX_DEPLOYMENT_TARGET'] = target

</code></pre></div>
<p dir="auto">With OS X Big Sur, <code class="notranslate">sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')</code> can return the int 11, but <code class="notranslate">os.environ[..] = target</code> wants <code class="notranslate">target</code> to be a string. As a result, <code class="notranslate">numpy</code> won't compile from source. This arose in the context of Sagemath, in which numpy is compiled from source.</p>
<h3 dir="auto">Error message:</h3>
<p dir="auto">Building from source results in</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="building library &quot;npymath&quot; sources
Traceback (most recent call last):
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/setup.py&quot;, line 508, in &lt;module&gt;
    setup_package()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/setup.py&quot;, line 500, in setup_package
    setup(**metadata)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/core.py&quot;, line 169, in setup
    return old_setup(**new_attr)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/lib/python3.9/site-packages/setuptools/__init__.py&quot;, line 163, in setup
    return distutils.core.setup(**attrs)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py&quot;, line 148, in setup
    dist.run_commands()
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 966, in run_commands
    self.run_command(cmd)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command
    cmd_obj.run()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/lib/python3.9/site-packages/wheel/bdist_wheel.py&quot;, line 299, in run
    self.run_command('build')
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py&quot;, line 313, in run_command
    self.distribution.run_command(command)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command
    cmd_obj.run()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build.py&quot;, line 40, in run
    old_build.run(self)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py&quot;, line 135, in run
    self.run_command(cmd_name)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py&quot;, line 313, in run_command
    self.distribution.run_command(command)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command
    cmd_obj.run()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py&quot;, line 144, in run
    self.build_sources()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py&quot;, line 155, in build_sources
    self.build_library_sources(*libname_info)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py&quot;, line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py&quot;, line 378, in generate_sources
    source = func(extension, build_dir)
  File &quot;numpy/core/setup.py&quot;, line 658, in get_mathlib_info
    st = config_cmd.try_link('int main(void) { return 0;}')
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py&quot;, line 241, in try_link
    self._check_compiler()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/config.py&quot;, line 80, in _check_compiler
    self.fcompiler = new_fcompiler(compiler=self.fcompiler,
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py&quot;, line 880, in new_fcompiler
    compiler = get_default_fcompiler(plat, requiref90=requiref90,
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py&quot;, line 851, in get_default_fcompiler
    compiler_type =  _find_existing_fcompiler(matching_compiler_types,
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py&quot;, line 802, in _find_existing_fcompiler
    c.customize(dist)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py&quot;, line 526, in customize
    linker_so_flags = self.flag_vars.linker_so
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/environment.py&quot;, line 37, in __getattr__
    return self._get_var(name, conf_desc)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/environment.py&quot;, line 53, in _get_var
    var = self._hook_handler(name, hook)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py&quot;, line 705, in _environment_hook
    return hook()
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/gnu.py&quot;, line 346, in get_flags_linker_so
    flags = GnuFCompiler.get_flags_linker_so(self)
  File &quot;/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/gnu.py&quot;, line 136, in get_flags_linker_so
    os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py&quot;, line 684, in __setitem__
    value = self.encodevalue(value)
  File &quot;/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py&quot;, line 756, in encode
    raise TypeError(&quot;str expected, not %s&quot; % type(value).__name__)
TypeError: str expected, not int"><pre class="notranslate"><code class="notranslate">building library "npymath" sources
Traceback (most recent call last):
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/setup.py", line 508, in &lt;module&gt;
    setup_package()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/setup.py", line 500, in setup_package
    setup(**metadata)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/lib/python3.9/site-packages/setuptools/__init__.py", line 163, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
    self.run_command('build')
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build.py", line 40, in run
    old_build.run(self)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py", line 144, in run
    self.build_sources()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py", line 155, in build_sources
    self.build_library_sources(*libname_info)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py", line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/build_src.py", line 378, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 658, in get_mathlib_info
    st = config_cmd.try_link('int main(void) { return 0;}')
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py", line 241, in try_link
    self._check_compiler()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/command/config.py", line 80, in _check_compiler
    self.fcompiler = new_fcompiler(compiler=self.fcompiler,
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py", line 880, in new_fcompiler
    compiler = get_default_fcompiler(plat, requiref90=requiref90,
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py", line 851, in get_default_fcompiler
    compiler_type =  _find_existing_fcompiler(matching_compiler_types,
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py", line 802, in _find_existing_fcompiler
    c.customize(dist)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py", line 526, in customize
    linker_so_flags = self.flag_vars.linker_so
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/environment.py", line 37, in __getattr__
    return self._get_var(name, conf_desc)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/environment.py", line 53, in _get_var
    var = self._hook_handler(name, hook)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/__init__.py", line 705, in _environment_hook
    return hook()
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/gnu.py", line 346, in get_flags_linker_so
    flags = GnuFCompiler.get_flags_linker_so(self)
  File "/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.3.beta5/local/var/tmp/sage/build/numpy-1.19.4/src/numpy/distutils/fcompiler/gnu.py", line 136, in get_flags_linker_so
    os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 684, in __setitem__
    value = self.encodevalue(value)
  File "/usr/local/Cellar/python@3.9/3.9.1_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 756, in encode
    raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not int
</code></pre></div>
<h3 dir="auto">NumPy/Python version information:</h3>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; print(sys.version)
3.9.1 (default, Dec 24 2020, 16:23:16) 
[Clang 12.0.0 (clang-1200.0.32.28)]"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">sys</span>.<span class="pl-s1">version</span>)
<span class="pl-c1">3.9</span>.<span class="pl-c1">1</span> (<span class="pl-s1">default</span>, <span class="pl-v">Dec</span> <span class="pl-c1">24</span> <span class="pl-c1">2020</span>, <span class="pl-c1">16</span>:<span class="pl-c1">23</span>:<span class="pl-c1">16</span>) 
[<span class="pl-v">Clang</span> <span class="pl-c1">12.0</span><span class="pl-c1">.0</span> (<span class="pl-s1">clang</span><span class="pl-c1">-</span><span class="pl-c1">1200.0</span>.<span class="pl-c1">32.28</span>)]</pre></div>
<p dir="auto">Attempting to build numpy-1.19.4.</p>
<p dir="auto">Suggested fix:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index caa0854..ff8bfdd 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -133,7 +133,7 @@ class GnuFCompiler(FCompiler):
                     target = '10.9'
                     s = f'Env. variable MACOSX_DEPLOYMENT_TARGET set to {target}'
                     warnings.warn(s, stacklevel=2)
-                os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
+                os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(target)
             opt.extend(['-undefined', 'dynamic_lookup', '-bundle'])
         else:
             opt.append(&quot;-shared&quot;)"><pre class="notranslate"><span class="pl-c1">diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py</span>
index caa0854..ff8bfdd 100644
<span class="pl-md">--- a/numpy/distutils/fcompiler/gnu.py</span>
<span class="pl-mi1">+++ b/numpy/distutils/fcompiler/gnu.py</span>
<span class="pl-mdr">@@ -133,7 +133,7 @@</span> class GnuFCompiler(FCompiler):
                     target = '10.9'
                     s = f'Env. variable MACOSX_DEPLOYMENT_TARGET set to {target}'
                     warnings.warn(s, stacklevel=2)
<span class="pl-md"><span class="pl-md">-</span>                os.environ['MACOSX_DEPLOYMENT_TARGET'] = target</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(target)</span>
             opt.extend(['-undefined', 'dynamic_lookup', '-bundle'])
         else:
             opt.append("-shared")</pre></div>
<p dir="auto">or insert a call to <code class="notranslate">str</code> when defining <code class="notranslate">target</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="target = str(sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET'))"><pre class="notranslate"><code class="notranslate">target = str(sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET'))
</code></pre></div>
<p dir="auto">Not sure that this issue is related to NumPy.<br>
When I try to install NumPy with Pipenv, it fails with a <code class="notranslate">TypeError</code> exception.<br>
This issue doesn't seem to happen if using <code class="notranslate">pip</code> directly.</p>
<h3 dir="auto">Steps to reproduce:</h3>

<p dir="auto">I could reproduce with this config:</p>
<ul dir="auto">
<li>macOS 11.0 (Intel)</li>
<li>Python 3.9.0</li>
<li>pip 20.3.1</li>
<li>pipenv, version 2020.11.15</li>
</ul>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ mkdir my_project &amp;&amp; cd my_project
$ pipenv --three
$ pipenv install numpy"><pre class="notranslate">$ <span class="pl-s1">mkdir my_project <span class="pl-k">&amp;&amp;</span> <span class="pl-c1">cd</span> my_project</span>
$ <span class="pl-s1">pipenv --three</span>
$ <span class="pl-s1">pipenv install numpy</span></pre></div>
<h3 dir="auto">Error message:</h3>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py&quot;, line 257, in &lt;module&gt;
    main()
  File &quot;/usr/local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py&quot;, line 240, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File &quot;/usr/local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py&quot;, line 110, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 157, in prepare_metadata_for_build_wheel
    self.run_setup()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 248, in run_setup
    super(_BuildMetaLegacyBackend,
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 142, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File &quot;setup.py&quot;, line 508, in &lt;module&gt;
    setup_package()
  File &quot;setup.py&quot;, line 500, in setup_package
    setup(**metadata)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/core.py&quot;, line 169, in setup
    return old_setup(**new_attr)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/__init__.py&quot;, line 165, in setup
    return distutils.core.setup(**attrs)
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py&quot;, line 148, in setup
    dist.run_commands()
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 966, in run_commands
    self.run_command(cmd)
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command
    cmd_obj.run()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py&quot;, line 31, in run
    egg_info.run()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/egg_info.py&quot;, line 24, in run
    self.run_command(&quot;build_src&quot;)
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py&quot;, line 313, in run_command
    self.distribution.run_command(command)
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 985, in run_command
    cmd_obj.run()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py&quot;, line 144, in run
    self.build_sources()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py&quot;, line 155, in build_sources
    self.build_library_sources(*libname_info)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py&quot;, line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py&quot;, line 378, in generate_sources
    source = func(extension, build_dir)
  File &quot;numpy/core/setup.py&quot;, line 658, in get_mathlib_info
    st = config_cmd.try_link('int main(void) { return 0;}')
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py&quot;, line 241, in try_link
    self._check_compiler()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/config.py&quot;, line 80, in _check_compiler
    self.fcompiler = new_fcompiler(compiler=self.fcompiler,
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 880, in new_fcompiler
    compiler = get_default_fcompiler(plat, requiref90=requiref90,
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 851, in get_default_fcompiler
    compiler_type =  _find_existing_fcompiler(matching_compiler_types,
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 802, in _find_existing_fcompiler
    c.customize(dist)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 526, in customize
    linker_so_flags = self.flag_vars.linker_so
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/environment.py&quot;, line 37, in __getattr__
    return self._get_var(name, conf_desc)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/environment.py&quot;, line 53, in _get_var
    var = self._hook_handler(name, hook)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py&quot;, line 705, in _environment_hook
    return hook()
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/gnu.py&quot;, line 346, in get_flags_linker_so
    flags = GnuFCompiler.get_flags_linker_so(self)
  File &quot;/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/gnu.py&quot;, line 136, in get_flags_linker_so
    os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py&quot;, line 684, in __setitem__
    value = self.encodevalue(value)
  File &quot;/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py&quot;, line 756, in encode
    raise TypeError(&quot;str expected, not %s&quot; % type(value).__name__)
TypeError: str expected, not int"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py", line 257, in &lt;module&gt;
    main()
  File "/usr/local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py", line 240, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/local/lib/python3.9/site-packages/pipenv/patched/notpip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
    self.run_setup()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 508, in &lt;module&gt;
    setup_package()
  File "setup.py", line 500, in setup_package
    setup(**metadata)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-build-env-uhf9fd_v/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run
    egg_info.run()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/egg_info.py", line 24, in run
    self.run_command("build_src")
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py", line 144, in run
    self.build_sources()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py", line 155, in build_sources
    self.build_library_sources(*libname_info)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py", line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/build_src.py", line 378, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 658, in get_mathlib_info
    st = config_cmd.try_link('int main(void) { return 0;}')
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/config.py", line 241, in try_link
    self._check_compiler()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/command/config.py", line 80, in _check_compiler
    self.fcompiler = new_fcompiler(compiler=self.fcompiler,
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py", line 880, in new_fcompiler
    compiler = get_default_fcompiler(plat, requiref90=requiref90,
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py", line 851, in get_default_fcompiler
    compiler_type =  _find_existing_fcompiler(matching_compiler_types,
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py", line 802, in _find_existing_fcompiler
    c.customize(dist)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py", line 526, in customize
    linker_so_flags = self.flag_vars.linker_so
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/environment.py", line 37, in __getattr__
    return self._get_var(name, conf_desc)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/environment.py", line 53, in _get_var
    var = self._hook_handler(name, hook)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/__init__.py", line 705, in _environment_hook
    return hook()
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/gnu.py", line 346, in get_flags_linker_so
    flags = GnuFCompiler.get_flags_linker_so(self)
  File "/private/var/folders/6n/lncv_nl546ndn321m0fgdsfm0000gn/T/pip-resolver-wlds30r_/numpy/numpy/distutils/fcompiler/gnu.py", line 136, in get_flags_linker_so
    os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 684, in __setitem__
    value = self.encodevalue(value)
  File "/usr/local/Cellar/python@3.9/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 756, in encode
    raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not int
</code></pre></div>