Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: ERROR building development env using Docker #45807

Closed
3 tasks done
NumberPiOso opened this issue Feb 3, 2022 · 2 comments · Fixed by #45889
Closed
3 tasks done

BUG: ERROR building development env using Docker #45807

NumberPiOso opened this issue Feb 3, 2022 · 2 comments · Fixed by #45889
Labels
Build Library building on various platforms
Milestone

Comments

@NumberPiOso
Copy link
Contributor

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

docker build --tag pandas-numberpioso-env .

ERROR: Command errored out with exit status 1: /opt/conda/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/pandas/setup.py'"'"'; __file__='"'"'/home/pandas/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.


<details>
  Running setup.py develop for pandas
    ERROR: Command errored out with exit status 1:
     command: /opt/conda/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/pandas/setup.py'"'"'; __file__='"'"'/home/pandas/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /home/pandas/
    Complete output (25 lines):
    running develop
    running egg_info
    writing pandas.egg-info/PKG-INFO
    writing dependency_links to pandas.egg-info/dependency_links.txt
    writing entry points to pandas.egg-info/entry_points.txt
    writing requirements to pandas.egg-info/requires.txt
    writing top-level names to pandas.egg-info/top_level.txt
    reading manifest file 'pandas.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    /tmp/pip-build-env-lkhctcw3/overlay/lib/python3.8/site-packages/setuptools/command/easy_install.py:157: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /tmp/pip-build-env-lkhctcw3/overlay/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    no previously-included directories found matching 'doc/build'
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching '#*' found anywhere in distribution
    warning: no previously-included files matching '*.py[ocd]' found anywhere in distribution
    adding license file 'LICENSE'
    running build_ext
    building 'pandas._libs.algos' extension
    /opt/conda/compiler_compat/ld: cannot find /lib64/libpthread.so.0
    /opt/conda/compiler_compat/ld: cannot find /usr/lib64/libpthread_nonshared.a
    collect2: error: ld returned 1 exit status
    error: command '/opt/conda/bin/gcc' failed with exit code 1
    ----------------------------------------
</details>

Issue Description

Last command python -m pip install -e . at the Dockerfile fails:

pandas/Dockerfile

Lines 42 to 48 in 5c757e9

SHELL ["/bin/bash", "-c"]
RUN . /opt/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& cd "$pandas_home" \
&& export \
&& python setup.py build_ext -j 4 \
&& python -m pip install -e .

Running manually those lines at docker image is successful until we arrive at this one
python -m pip install -e .

Expected Behavior

I would expect that the image should be successfully built

> docker build --tag pandas-numberpioso-env
Successfully built a3c5533304a3
Successfully tagged pandas-numberpioso-env:latest

Installed Versions

INSTALLED VERSIONS ------------------ commit : 5c757e9 python : 3.8.12.final.0 python-bits : 64 OS : Linux OS-release : 5.13.0-28-generic Version : #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8

pandas : 1.5.0.dev0+277.g5c757e9c4c.dirty
numpy : 1.19.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 59.8.0
Cython : 0.29.26
pytest : 6.2.5
hypothesis : 6.36.0
sphinx : 4.4.0
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : 4.7.1
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 8.0.1
pandas_datareader: None
bs4 : 4.10.0
bottleneck : 1.3.2
fastparquet : 0.7.2
fsspec : 2021.11.0
gcsfs : 2021.11.0
matplotlib : 3.5.1
numba : 0.55.0
numexpr : 2.8.0
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 6.0.1
pyreadstat : 1.1.4
pyxlsb : None
s3fs : 2021.11.0
scipy : 1.7.3
sqlalchemy : 1.4.30
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
zstandard : None

@NumberPiOso NumberPiOso added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 3, 2022
@jbrockmendel jbrockmendel added the Build Library building on various platforms label Feb 4, 2022
@rendner
Copy link
Contributor

rendner commented Feb 8, 2022

I recognized the same problem some days ago.

To create the docker image I added the following two lines:

    && ln -s "$CONDA_BUILD_SYSROOT"/lib64/* /lib64/ || true \
    && ln -s "$CONDA_BUILD_SYSROOT"/usr/lib64/* /usr/lib64/ || true \

between these two lines:

pandas/Dockerfile

Lines 47 to 48 in 5c757e9

&& python setup.py build_ext -j 4 \
&& python -m pip install -e .

This ugly workaround seems to "fix" the problem.

@rendner
Copy link
Contributor

rendner commented Feb 9, 2022

You have to change the last line to python -m pip install --no-build-isolation -e . to make it work. I will create a PR with the fix.

@gesoos gesoos mentioned this issue Feb 9, 2022
1 task
@mroeschke mroeschke removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 11, 2022
@jreback jreback added this to the 1.5 milestone Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants