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

Ghalton python3.6 error #16

Open
mhdhassan opened this issue Sep 12, 2020 · 6 comments
Open

Ghalton python3.6 error #16

mhdhassan opened this issue Sep 12, 2020 · 6 comments

Comments

@mhdhassan
Copy link

Dear @fmder
I am trying to install ghalton package i encounter the following error (python.3.6) any advice how to solve it.

Kind regards,

Collecting ghalton
Using cached https://files.pythonhosted.org/packages/e7/95/8869ba0de83e2b3aa30b40d4c1a4aaf8339f77130728523b8508aa581c27/ghalton-0.6.2.tar.gz
Building wheels for collected packages: ghalton
Running setup.py bdist_wheel for ghalton: started
Running setup.py bdist_wheel for ghalton: finished with status 'error'
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pycharm-packaging4/ghalton/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 /tmp/tmpegi_1aclpip-wheel- --python-tag cp36:
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/ghalton
copying ghalton/constants.py -> build/lib.linux-x86_64-3.6/ghalton
copying ghalton/ghalton_wrapper.py -> build/lib.linux-x86_64-3.6/ghalton
copying ghalton/init.py -> build/lib.linux-x86_64-3.6/ghalton
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'ghalton._ghalton_wrapper' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/Halton_wrap.cxx -o build/temp.linux-x86_64-3.6/src/Halton_wrap.o -stdlib=libc++
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-stdlib=libc++’
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Running setup.py clean for ghalton
Failed to build ghalton
Installing collected packages: ghalton
Running setup.py install for ghalton: started
Running setup.py install for ghalton: finished with status 'error'
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pycharm-packaging4/ghalton/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-k1nbqx8_-record/install-record.txt --single-version-externally-managed --compile:
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/ghalton
copying ghalton/constants.py -> build/lib.linux-x86_64-3.6/ghalton
copying ghalton/ghalton_wrapper.py -> build/lib.linux-x86_64-3.6/ghalton
copying ghalton/init.py -> build/lib.linux-x86_64-3.6/ghalton
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'ghalton._ghalton_wrapper' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/Halton_wrap.cxx -o build/temp.linux-x86_64-3.6/src/Halton_wrap.o -stdlib=libc++
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-stdlib=libc++’
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Failed building wheel for ghalton
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pycharm-packaging4/ghalton/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-k1nbqx8_-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pycharm-packaging4/ghalton/

@fmder
Copy link
Owner

fmder commented Oct 4, 2020

What is your OS? Wheels are available for most common OS on PyPI. Maybe clean your pip cache can help.

https://pypi.org/project/ghalton/#files

@mhdhassan
Copy link
Author

dear @fmder
I did pip cache purge (did not work).
OS is Ubuntu Ubuntu 18.04.5 LTS
I have lengthy searched the internet for this issue but unfortunately without much luck. below some of the errors that I have encountered .

Kind Regards,

mohammed@utwks605:Downloads$ pip3 install ghalton-0.6.2-cp27-cp27mu-manylinux2010_x86_64.whl --use-feature=2020-resolver
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: ghalton-0.6.2-cp27-cp27mu-manylinux2010_x86_64.whl is not a supported wheel on this platform.
mohammed@utwks605:Downloads$ pip3 install ghalton-0.6.2-cp27-cp27m-manylinux2010_x86_64.whl --use-feature=2020-resolver
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see pypa/pip#5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: ghalton-0.6.2-cp27-cp27m-manylinux2010_x86_64.whl is not a supported wheel on this platform.
mohammed@utwks605:Downloads$

@fmder
Copy link
Owner

fmder commented Oct 5, 2020

Would it be a pip issue? The warning issued by pip look suspicious. You may bevrunning an old pip. I suggest you to create a clean virtual environment and update pip with pip install -U pip.

@cserpell
Copy link

I am experiencing a similar issue in a clean environment, it may be related to source compiled by a different compiler as mentioned here ? https://stackoverflow.com/questions/24419832/unrecognized-command-line-option-stdlib-libc-with-macports-gcc48

Or to the deprecation warning in the output?

To reproduce:

python3 -m venv p3
. p3/bin/activate
pip install --upgrade pip
pip --version
python --version
pip install ghalton

I get:

pip 22.3.1 from /home/cserpell/git/infiniteqr/itl/p3/lib/python3.10/site-packages/pip (python 3.10)
Python 3.10.7
  DEPRECATION: ghalton is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for ghalton ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for ghalton did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running install
      /home/cserpell/git/infiniteqr/itl/pp/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/ghalton
      copying ghalton/__init__.py -> build/lib.linux-x86_64-3.10/ghalton
      copying ghalton/constants.py -> build/lib.linux-x86_64-3.10/ghalton
      copying ghalton/ghalton_wrapper.py -> build/lib.linux-x86_64-3.10/ghalton
      running build_ext
      building 'ghalton._ghalton_wrapper' extension
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/src
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/cserpell/git/infiniteqr/itl/pp/include -I/usr/include/python3.10 -c src/Halton.cpp -o build/temp.linux-x86_64-3.10/src/Halton.o -stdlib=libc++
      x86_64-linux-gnu-gcc: error: unrecognized command-line option ‘-stdlib=libc++’
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ghalton

note: This is an issue with the package mentioned above, not pip.

@fmder
Copy link
Owner

fmder commented Feb 5, 2023

On what system are you trying to build ghalton?

@cserpell
Copy link

cserpell commented Feb 5, 2023

Ubuntu,
Python 3.10.7
pip 22.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants