<h3 dir="auto">Steps to reproduce:</h3>
<p dir="auto">Hello, I am using OS  Win 10.  I am trying to create my first build. I am using the community edition of pycharm. I am also using a virtual environment Here are my requirements</p>
<p dir="auto">ansi2html==1.8.0<br>
anyio==3.6.2<br>
argon2-cffi==21.3.0<br>
argon2-cffi-bindings==21.2.0<br>
arrow==1.2.3<br>
asttokens==2.2.1<br>
attrs==22.2.0<br>
backcall==0.2.0<br>
beautifulsoup4==4.11.2<br>
bleach==6.0.0<br>
blis==0.7.9<br>
Brotli==1.0.9<br>
catalogue==2.0.8<br>
cffi==1.15.1<br>
charset-normalizer==3.0.1<br>
click==7.1.2<br>
colorama==0.4.6<br>
comm==0.1.2<br>
confection==0.0.4<br>
contourpy==1.0.7<br>
cycler==0.11.0<br>
cymem==2.0.7<br>
dash==1.21.0<br>
dash-bootstrap-components==0.13.1<br>
dash-core-components==1.17.1<br>
dash-html-components==1.1.4<br>
dash-table==4.12.0<br>
debugpy==1.6.6<br>
decorator==5.1.1<br>
defusedxml==0.7.1<br>
en-core-web-sm @ <a href="https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl">https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl</a><br>
executing==1.2.0<br>
fastjsonschema==2.16.2<br>
Flask==1.1.4<br>
Flask-Compress==1.10.1<br>
fonttools==4.38.0<br>
fqdn==1.5.1<br>
funcy==1.17<br>
future==0.18.2<br>
gunicorn==20.0.4<br>
idna==3.4<br>
import-ipynb==0.1.4<br>
importlib-metadata==6.0.0<br>
importlib-resources==5.10.2<br>
ipykernel==6.21.2<br>
ipython==8.10.0<br>
ipython-genutils==0.2.0<br>
ipywidgets==8.0.4<br>
isoduration==20.11.0<br>
itsdangerous==1.1.0<br>
jedi==0.18.2<br>
Jinja2==2.11.3<br>
jsonpointer==2.3<br>
jsonschema==4.17.3<br>
jupyter==1.0.0<br>
jupyter-console==6.5.1<br>
jupyter-dash==0.4.0<br>
jupyter-events==0.6.3<br>
jupyter_client==8.0.2<br>
jupyter_core==5.2.0<br>
jupyter_server==2.3.0<br>
jupyter_server_terminals==0.4.4<br>
jupyterlab-pygments==0.2.2<br>
jupyterlab-widgets==3.0.5<br>
kiwisolver==1.4.4<br>
langcodes==3.3.0<br>
MarkupSafe==2.0.1<br>
matplotlib==3.7.0<br>
matplotlib-inline==0.1.6<br>
mistune==2.0.5<br>
murmurhash==1.0.9<br>
nbclassic==0.5.1<br>
nbclient==0.7.2<br>
nbconvert==7.2.9<br>
nbformat==5.7.3<br>
nest-asyncio==1.5.6<br>
notebook==6.5.2<br>
notebook_shim==0.2.2<br>
numpy==1.23.4<br>
packaging==21.3<br>
pandas==1.3.3<br>
pandocfilters==1.5.0<br>
parso==0.8.3<br>
pathy==0.10.1<br>
patsy==0.5.3<br>
pickleshare==0.7.5<br>
Pillow==9.4.0<br>
platformdirs==3.0.0<br>
plotly==5.10.0<br>
preshed==3.0.8<br>
prometheus-client==0.16.0<br>
prompt-toolkit==3.0.36<br>
psutil==5.9.4<br>
pure-eval==0.2.2<br>
pycparser==2.21<br>
pydantic==1.10.4<br>
Pygments==2.14.0<br>
pyLDAvis==3.3.1<br>
pyparsing==3.0.9<br>
pyrsistent==0.19.3<br>
python-dateutil==2.8.2<br>
python-json-logger==2.0.6<br>
pytz==2022.4<br>
pywin32==305<br>
pywinpty==2.0.10<br>
PyYAML==6.0<br>
pyzmq==25.0.0<br>
qtconsole==5.4.0<br>
QtPy==2.3.0<br>
requests==2.28.2<br>
retrying==1.3.4<br>
rfc3339-validator==0.1.4<br>
rfc3986-validator==0.1.1<br>
scipy==1.9.2<br>
seaborn==0.12.2<br>
Send2Trash==1.8.0<br>
six==1.16.0<br>
sklearn==0.0.post2<br>
smart-open==6.3.0<br>
sniffio==1.3.0<br>
soupsieve==2.4<br>
spacy==3.5.0<br>
spacy-legacy==3.0.12<br>
spacy-loggers==1.0.4<br>
srsly==2.4.5<br>
stack-data==0.6.2<br>
statsmodels==0.13.2<br>
tenacity==8.1.0<br>
terminado==0.17.1<br>
textblob==0.17.1<br>
thinc==8.1.7<br>
tinycss2==1.2.1<br>
tornado==6.2<br>
traitlets==5.9.0<br>
typer==0.7.0<br>
typing_extensions==4.4.0<br>
uri-template==1.2.0<br>
urllib3==1.26.14<br>
wasabi==1.1.1<br>
wcwidth==0.2.6<br>
webcolors==1.12<br>
webencodings==0.5.1<br>
websocket-client==1.5.1<br>
Werkzeug==1.0.1<br>
widgetsnbextension==4.0.5<br>
wincertstore==0.2<br>
zipp==3.13.0</p>
<h3 dir="auto">Error message:</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="remote:                    gcc: build/src.linux-x86_64-3.11/numpy/core/src/umath/matmul.c
remote:                    gcc: build/src.linux-x86_64-3.11/numpy/core/src/umath/clip.c
remote:                    gcc: numpy/core/src/umath/ufunc_object.c
remote:                    gcc: numpy/core/src/umath/extobj.c
remote:                    gcc: build/src.linux-x86_64-3.11/numpy/core/src/umath/scalarmath.c
remote:                    error: Command &quot;gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DNP
Y_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_S
OURCE=1 -Ibuild/src.linux-x86_64-3.11/numpy/core/src/umath -Ibuild/src.linux-x86_64-3.11/numpy/core/sr
c/npymath -Ibuild/src.linux-x86_64-3.11/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x
86_64-3.11/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core
/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/app/.herok
u/python/include/python3.11 -Ibuild/src.linux-x86_64-3.11/numpy/core/src/common -Ibuild/src.linux-x86_
64-3.11/numpy/core/src/npymath -c build/src.linux-x86_64-3.11/numpy/core/src/multiarray/scalartypes.c 
-o build/temp.linux-x86_64-3.11/build/src.linux-x86_64-3.11/numpy/core/src/multiarray/scalartypes.o -M
MD -MF build/temp.linux-x86_64-3.11/build/src.linux-x86_64-3.11/numpy/core/src/multiarray/scalartypes.
o.d -std=c99&quot; failed with exit status 1
remote:                    [end of output]
remote:
remote:                note: This error originates from a subprocess, and is likely not a problem with
 pip.
remote:                ERROR: Failed building wheel for numpy
remote:              Failed to build numpy
remote:              ERROR: Could not build wheels for numpy, which is required to install pyproject.t
oml-based projects
remote:              [end of output]
remote:
remote:          note: This error originates from a subprocess, and is likely not a problem with pip. 
remote:        error: subprocess-exited-with-error
remote:
remote:        × pip subprocess to install build dependencies did not run successfully.
remote:        │ exit code: 1
remote:        ╰─&gt; See above for output.
remote:
remote:        note: This error originates from a subprocess, and is likely not a problem with pip.   
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: 8cdbd427e0d29c4d7ef241c1
9c7d790035f80d8b
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 8cdbd427e0d2
9c4d7ef241c19c7d790035f80d8b
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a diffe
rent branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku &lt;branchname&gt;:main
remote:  !     git push heroku &lt;branchname&gt;:main
remote:  !     git push heroku &lt;branchname&gt;:main
remote:  !     git push heroku &lt;branchname&gt;:main
remote:  !     git push heroku &lt;branchname&gt;:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote:"><pre class="notranslate">remote:                    gcc: build/src.linux-x86_64-3.11/numpy/core/src/umath/matmul.c
remote:                    gcc: build/src.linux-x86_64-3.11/numpy/core/src/umath/clip.c
remote:                    gcc: numpy/core/src/umath/ufunc_object.c
remote:                    gcc: numpy/core/src/umath/extobj.c
remote:                    gcc: build/src.linux-x86_64-3.11/numpy/core/src/umath/scalarmath.c
remote:                    error: Command <span class="pl-s"><span class="pl-pds">"</span>gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DNP</span>
<span class="pl-s">Y_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_S</span>
<span class="pl-s">OURCE=1 -Ibuild/src.linux-x86_64-3.11/numpy/core/src/umath -Ibuild/src.linux-x86_64-3.11/numpy/core/sr</span>
<span class="pl-s">c/npymath -Ibuild/src.linux-x86_64-3.11/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x</span>
<span class="pl-s">86_64-3.11/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core</span>
<span class="pl-s">/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/app/.herok</span>
<span class="pl-s">u/python/include/python3.11 -Ibuild/src.linux-x86_64-3.11/numpy/core/src/common -Ibuild/src.linux-x86_</span>
<span class="pl-s">64-3.11/numpy/core/src/npymath -c build/src.linux-x86_64-3.11/numpy/core/src/multiarray/scalartypes.c </span>
<span class="pl-s">-o build/temp.linux-x86_64-3.11/build/src.linux-x86_64-3.11/numpy/core/src/multiarray/scalartypes.o -M</span>
<span class="pl-s">MD -MF build/temp.linux-x86_64-3.11/build/src.linux-x86_64-3.11/numpy/core/src/multiarray/scalartypes.</span>
<span class="pl-s">o.d -std=c99<span class="pl-pds">"</span></span> failed with <span class="pl-c1">exit</span> status 1
remote:                    [end of output]
remote:
remote:                note: This error originates from a subprocess, and is likely not a problem with
 pip.
remote:                ERROR: Failed building wheel <span class="pl-k">for</span> numpy
remote:              Failed to build numpy
remote:              ERROR: Could not build wheels <span class="pl-k">for</span> numpy, which is required to install pyproject.t
oml-based projects
remote:              [end of output]
remote:
remote:          note: This error originates from a subprocess, and is likely not a problem with pip. 
remote:        error: subprocess-exited-with-error
remote:
remote:        × pip subprocess to install build dependencies did not run successfully.
remote:        │ <span class="pl-c1">exit</span> code: 1
remote:        ╰─<span class="pl-k">&gt;</span> See above <span class="pl-k">for</span> output.
remote:
remote:        note: This error originates from a subprocess, and is likely not a problem with pip.   
remote:  <span class="pl-k">!</span>     Push rejected, failed to compile Python app.
remote:
remote:  <span class="pl-k">!</span>     Push failed
remote:  <span class="pl-k">!</span>
remote:  <span class="pl-k">!</span> <span class="pl-c"><span class="pl-c">#</span># Warning - The same version of this code has already been built: 8cdbd427e0d29c4d7ef241c1</span>
9c7d790035f80d8b
remote:  <span class="pl-k">!</span>
remote:  <span class="pl-k">!</span> We have detected that you have triggered a build from <span class="pl-c1">source</span> code with version 8cdbd427e0d2
9c4d7ef241c19c7d790035f80d8b
remote:  <span class="pl-k">!</span> at least twice. One common cause of this behavior is attempting to deploy code from a diffe
rent branch.
remote:  <span class="pl-k">!</span>
remote:  <span class="pl-k">!</span> If you are developing on a branch and deploying via git you must run:
remote:  <span class="pl-k">!</span>
remote:  <span class="pl-k">!</span>     git push heroku <span class="pl-k">&lt;</span>branchname<span class="pl-k">&gt;</span>:main
remote:  <span class="pl-k">!</span>     git push heroku <span class="pl-k">&lt;</span>branchname<span class="pl-k">&gt;</span>:main
remote:  <span class="pl-k">!</span>     git push heroku <span class="pl-k">&lt;</span>branchname<span class="pl-k">&gt;</span>:main
remote:  <span class="pl-k">!</span>     git push heroku <span class="pl-k">&lt;</span>branchname<span class="pl-k">&gt;</span>:main
remote:  <span class="pl-k">!</span>     git push heroku <span class="pl-k">&lt;</span>branchname<span class="pl-k">&gt;</span>:main
remote:  <span class="pl-k">!</span>
remote:  <span class="pl-k">!</span> This article goes into details on the behavior:
remote:  <span class="pl-k">!</span>   https://devcenter.heroku.com/articles/duplicate-build-version
remote:</pre></div>
<h3 dir="auto">Additional information:</h3>
<p dir="auto">Please Help!</p>
<p dir="auto">Using Python 3 and Numpy 1.9.2 there is an issue with <code class="notranslate">numpy.fromfile</code> when called on an existing file object. This code works fine in Python 2.7.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ fh
&lt;_io.FileIO name=8 mode='rb+'&gt;
$ np.fromfile(fh, dtype=dtype, count=length)
OSError: first argument must be an open file"><pre class="notranslate">$ <span class="pl-s1">fh</span>
<span class="pl-c1">&lt;</span><span class="pl-s1">_io</span>.<span class="pl-v">FileIO</span> <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-c1">8</span> <span class="pl-s1">mode</span><span class="pl-c1">=</span><span class="pl-s">'rb+'</span><span class="pl-c1">&gt;</span>
$ <span class="pl-s1">np</span>.<span class="pl-en">fromfile</span>(<span class="pl-s1">fh</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">dtype</span>, <span class="pl-s1">count</span><span class="pl-c1">=</span><span class="pl-s1">length</span>)
<span class="pl-v">OSError</span>: <span class="pl-s1">first</span> <span class="pl-s1">argument</span> <span class="pl-s1">must</span> <span class="pl-s1">be</span> <span class="pl-s1">an</span> <span class="pl-s1">open</span> <span class="pl-s1">file</span></pre></div>
<p dir="auto">I've checked <code class="notranslate">fh.closed</code> is <code class="notranslate">False</code>, so the file is still open. The error is thrown by <a href="https://github.com/numpy/numpy/blob/c29733c228ef6168b2f811f51113e9660bf6c47d/numpy/core/src/multiarray/multiarraymodule.c#L2119">numpy.multiarraymodule.c#2119</a>.</p>
<p dir="auto">Someone <a href="http://stackoverflow.com/questions/30466656/using-new-io-classes-with-numpy-fromfile-tofile-in-python-2-converting-io-class" rel="nofollow">mentioned these issues on Stack Overflow</a>, but no clear solutions are present.</p>
<p dir="auto">Any suggestions?</p>