Trying to install pdftopng with pip which is version 23.0.1 I get
~/06-Projekte/PycharmProjects/sgf2eps % pip install pdftopng
Collecting pdftopng
Using cached pdftopng-0.1.0.tar.gz (11 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting Click>=7.0
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Building wheels for collected packages: pdftopng
Building wheel for pdftopng (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pdftopng (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-13-x86_64-cpython-311
creating build/lib.macosx-13-x86_64-cpython-311/pdftopng
copying src/pdftopng/__init__.py -> build/lib.macosx-13-x86_64-cpython-311/pdftopng
copying src/pdftopng/__version__.py -> build/lib.macosx-13-x86_64-cpython-311/pdftopng
running egg_info
writing src/pdftopng.egg-info/PKG-INFO
writing dependency_links to src/pdftopng.egg-info/dependency_links.txt
writing requirements to src/pdftopng.egg-info/requires.txt
writing top-level names to src/pdftopng.egg-info/top_level.txt
reading manifest file 'src/pdftopng.egg-info/SOURCES.txt'
writing manifest file 'src/pdftopng.egg-info/SOURCES.txt'
copying src/pdftopng/pdftopng.cpp -> build/lib.macosx-13-x86_64-cpython-311/pdftopng
running build_ext
creating var
creating var/folders
creating var/folders/rf
creating var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn
creating var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn/T
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/opt/python#3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c /var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn/T/tmpl6tvr13s.cpp -o var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn/T/tmpl6tvr13s.o -std=c++14
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/opt/python#3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c /var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn/T/tmpav4l0ebv.cpp -o var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn/T/tmpav4l0ebv.o -fvisibility=hidden
building 'pdftopng.pdftopng' extension
creating build/temp.macosx-13-x86_64-cpython-311
creating build/temp.macosx-13-x86_64-cpython-311/src
creating build/temp.macosx-13-x86_64-cpython-311/src/pdftopng
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -DVERSION_INFO=\"0.1.0\" -Ilib/poppler -Ilib/poppler/fofi -Ilib/poppler/goo -Ilib/poppler/poppler -Ilib/poppler/build -Ilib/poppler/build/poppler -Ilib/poppler/utils -Ilib/poppler/build/utils -I/private/var/folders/rf/5wykxh413gg6djy1vmg0ypww0000gn/T/pip-build-env-xio3q4pz/overlay/lib/python3.11/site-packages/pybind11/include -I/usr/local/opt/python#3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/pdftopng/pdftopng.cpp -o build/temp.macosx-13-x86_64-cpython-311/src/pdftopng/pdftopng.o -O3 -Wall -shared -fPIC -stdlib=libc++ -mmacosx-version-min=10.7 -std=c++14 -fvisibility=hidden
clang: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
src/pdftopng/pdftopng.cpp:44:10: fatal error: 'config.h' file not found
#include "config.h"
^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pdftopng
Failed to build pdftopng
ERROR: Could not build wheels for pdftopng, which is required to install pyproject.toml-based projects
The strange thing is, that I already had pdftopng installed and it has been working. I don't know what happens.
Related
python 3.9
pip 22.3.1
setuptools 66.0.0
wheel 0.38.4
when install yolox, there is always error in installing pycocotools as below:
× Building wheel for pycocotools (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
creating build/lib.macosx-10.9-universal2-cpython-39/pycocotools
copying pycocotools/coco.py -> build/lib.macosx-10.9-universal2-cpython-39/pycocotools
copying pycocotools/mask.py -> build/lib.macosx-10.9-universal2-cpython-39/pycocotools
copying pycocotools/init.py -> build/lib.macosx-10.9-universal2-cpython-39/pycocotools
copying pycocotools/cocoeval.py -> build/lib.macosx-10.9-universal2-cpython-39/pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools/mask.c
/private/var/folders/g9/4g2rq3px69lbr64qqpmw5_280000gn/T/pip-build-env-kb70uki/overlay/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/g9/4g2rq3px69lbr64qqpmw5_280000gn/T/pip-install-zc58cnkb/pycocotools_f63b404805f6427bb06acdd61bfd63a0/pycocotools/mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools.mask' extension
creating build/temp.macosx-10.9-universal2-cpython-39
creating build/temp.macosx-10.9-universal2-cpython-39/common
creating build/temp.macosx-10.9-universal2-cpython-39/pycocotools
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/private/var/folders/g9/4g2rq3px69lbr64qqpmw5_280000gn/T/pip-build-env-kb70uki/overlay/lib/python3.9/site-packages/numpy/core/include -I./common -I/Users/zhangelaine/env/YOLOX/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c ./common/maskApi.c -o build/temp.macosx-10.9-universal2-cpython-39/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
./common/maskApi.c:151:32: warning: unused variable 'xp' [-Wunused-variable]
uint h, w, xs, ys, xe, ye, xp, cc; siz j, m;
^
1 warning generated.
./common/maskApi.c:151:32: warning: unused variable 'xp' [-Wunused-variable]
uint h, w, xs, ys, xe, ye, xp, cc; siz j, m;
^
1 warning generated.
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/private/var/folders/g9/4g2rq3px69lbr64qqpmw5_280000gn/T/pip-build-env-kb70uki/overlay/lib/python3.9/site-packages/numpy/core/include -I./common -I/Users/zhangelaine/env/YOLOX/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c pycocotools/_mask.c -o build/temp.macosx-10.9-universal2-cpython-39/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
pycocotools/_mask.c:6:10: fatal error: 'Python.h' file not found
#include "Python.h"
^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycocotools
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
so i goto pycocotools website to downlord whl file.
https://pypi.tuna.tsinghua.edu.cn/simple/pycocotools-windows/ and got error as below
ERROR: pycocotools_windows-2.0.0.2-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
any suggestion ? thanks a lot
solution : use miniforge to install conda
and install pycocotools with conda in Mac m1. It works, no error anymore
however pip install in conda env is a little bit complicated,
i am tring it.
I ran pip install annoy and got the following error:
Collecting annoy
Using cached https://files.pythonhosted.org/packages/b5/28/f8ce7400344090bb5cfa1c9fae3fdb03b9438db082d458686442633d82a3/annoy-1.15.0.tar.gz
Building wheels for collected packages: annoy
Running setup.py bdist_wheel for annoy ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yp/4w8nvxls4y99r68kpxzzwdl00000gn/T/pip-build-h3hirwtn/annoy/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 /var/folders/yp/4w8nvxls4y99r68kpxzzwdl00000gn/T/tmpdqliidvopip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-3.6
creating build/lib.macosx-10.6-x86_64-3.6/annoy
copying annoy/__init__.py -> build/lib.macosx-10.6-x86_64-3.6/annoy
running build_ext
building 'annoy.annoylib' extension
creating build/temp.macosx-10.6-x86_64-3.6
creating build/temp.macosx-10.6-x86_64-3.6/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/include/python3.6m -c src/annoymodule.cc -o build/temp.macosx-10.6-x86_64-3.6/src/annoymodule.o -O3 -ffast-math -fno-associative-math -march=native
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from src/annoymodule.cc:15:
src/annoylib.h:49:10: fatal error: 'vector' file not found
#include <vector>
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
From reading other stackoverflow answers, I should compile with g++ rather than gcc? How do I do that?
I should compile with g++ rather than gcc : visibly yes, #include <vector> is typically C++, not C
The way to install g++ depend on the platform/OS you use
I'm installing PyObjus: sudo python setup.py install-> logging command:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/pyobjus
copying pyobjus/__init__.py -> build/lib.macosx-10.9-intel-2.7/pyobjus
copying pyobjus/debug.py -> build/lib.macosx-10.9-intel-2.7/pyobjus
copying pyobjus/dylib_manager.py -> build/lib.macosx-10.9-intel-2.7/pyobjus
copying pyobjus/objc_py_types.py -> build/lib.macosx-10.9-intel-2.7/pyobjus
copying pyobjus/protocols.py -> build/lib.macosx-10.9-intel-2.7/pyobjus
copying pyobjus/test.py -> build/lib.macosx-10.9-intel-2.7/pyobjus
running build_ext
cythoning pyobjus/pyobjus.pyx to pyobjus/pyobjus.c
building 'pyobjus' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/pyobjus
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pyobjus/pyobjus.c -o build/temp.macosx-10.9-intel-2.7/pyobjus/pyobjus.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
I'm using Xcode 5.1 on Mac 10.9. You can visit: https://github.com/kivy/pyobjus
I'm trying to upgrade Pillow on my Mac. When I run sudo pip install Pillow I get
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./lib/python2.7/site-packages/Pillow-2.3.0-py2.7-macosx-10.8-intel.egg
I run sudo pip install --upgrade Pillow and I get the following error:
copying PIL/OleFileIO-README.md -> build/lib.macosx-10.9-intel-2.7/PIL
running build_ext
--- using frameworks at /System/Library/Frameworks
building 'PIL._imaging' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/libImaging
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/opt/local/include/freetype2 -I/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/build/Pillow/libImaging -I/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/include -I/opt/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
----------------------------------------
Rolling back uninstall of Pillow
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/req.py", line 1439, in install
requirement.rollback_uninstall()
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/req.py", line 603, in rollback_uninstall
self.uninstalled.rollback()
File "/Users/edwinzg/School/College/SeniorYear/SpringSemester/rb-master/lib/python2.7/site-packages/pip/req.py", line 1855, in rollback
pth.rollback()
AttributeError: 'str' object has no attribute 'rollback'
Does anyone know how to fix this? Thanks.
This worked for me:
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install --upgrade pillow
I took the following steps after reading suggestions from http://andhikalegawa.wordpress.com/2012/01/05/installing-mysql-python-on-snow-leopard-using-xampp-mysql/
Downloaded MySQL-python-1.2.4b4 and unzipped
Changed the mysql_config = /Applications/XAMPP/xamppfiles/bin/mysql_config (as I am using XAMPP 1.7.3)
Downloaded mysql-5.1.70-osx10.6-x86 (I could not find 5.1.55 which is the version used in XAMPP) kept the include folder at /Applications/XAMPP/xamppfiles/
I am new to development so, downloaded XCode 4.6.3 with command line tools.
Logically it should have worked I am getting the following error
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.7-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.7-intel-2.7
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'beta',4) -D_version_=1.2.4b4 -I/Applications/XAMPP/xamppfiles/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -mmacosx-version-min=10.4 -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from _mysql.c:44:
/Applications/XAMPP/xamppfiles/include/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:8,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:891:1: warning: this is the location of the previous definition
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/6p/8bxdl12d2nq05dmwbmdzttt40000gn/T//cc0v0ehE.out
error: command 'llvm-gcc-4.2' failed with exit status 255
Looks like it's trying to compile universal for PowerPC, which you probably don't have?
error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2'
I would suggest setting the ARCHFLAGS:
shell> rm -Rf build/
shell> ARCHFLAGS="-arch i386" /usr/bin/python setup.py build
Or instead of i386, on 64-bit x86_64. But since you are downloading 32-bit MySQL, might be good to use i386.
Good luck! (Shameless advert: you can always try MySQL Connector/Python)