I need help fixing this. I have pillow 7.0.0 installed but it is not accessible in my virtual environment. Trying to install using pip install pillow in the virtual env throws the error below. Can someone shed some light on how to fix this?
Collecting pillow
Using cached Pillow-9.1.0.tar.gz (49.8 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pillow
Building wheel for pillow (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [156 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
...
x86_64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DPILLOW_VERSION=\"9.1.0\" -I/tmp/pip-install-dxz6gg5z/pillow_5c0ecf282df741a599c5f2ec14a30181 -I/usr/local/include -I/usr/include -I/home/onah/PycharmProjects/ecommerce/venv/include -I/usr/include/python3.11 -c src/_imaging.c -o build/temp.linux-x86_64-cpython-311/src/_imaging.o
x86_64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-install-dxz6gg5z/pillow_5c0ecf282df741a599c5f2ec14a30181 -I/usr/local/include -I/usr/include -I/home/onah/PycharmProjects/ecommerce/venv/include -I/usr/include/python3.11 -c src/_imagingmorph.c -o build/temp.linux-x86_64-cpython-311/src/_imagingmorph.o
Related
I'm trying to connect to SQL Server from Raspberry Pi 3. I've already tried everything that google search suggested and still can't manage to install pymssql using pip3.
All the needed packages were installed, but it still fails to create the wheel-file.
I get this error:
pi#nl-raspi:~ $ sudo pip3 install pymssql
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pymssql
Using cached https://files.pythonhosted.org/packages/25/f4/7a8f70edbfdc4de0f72ba44611b6ed6c175a1b2b1ce22051af0e8a8111c1/pymssql-2.2.2.tar.gz
Installing build dependencies ... done
Building wheels for collected packages: pymssql
Running setup.py bdist_wheel for pymssql ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-19za_p6j/pymssql/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/pip-wheel-3kw1_04w --python-tag cp37:
setup.py: platform.system() => Linux
setup.py: platform.architecture() => ('32bit', 'ELF')
setup.py: platform.libc_ver() => ('glibc', '2.28')
setup.py: include_dirs => []
setup.py: library_dirs => []
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/pymssql
copying src/pymssql/__init__.py -> build/lib.linux-armv7l-3.7/pymssql
running build_ext
cythoning src/pymssql/_mssql.pyx to src/pymssql/_mssql.c
cythoning src/pymssql/_pymssql.pyx to src/pymssql/_pymssql.c
building 'pymssql._mssql' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/src
creating build/temp.linux-armv7l-3.7/src/pymssql
arm-linux-gnueabihf-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.7m -c src/pymssql/_mssql.c -o build/temp.linux-armv7l-3.7/src/pymssql/_mssql.o -DMSDBLIB
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.7/src/pymssql/_mssql.o -lsybdb -lssl -lcrypto -o build/lib.linux-armv7l-3.7/pymssql/_mssql.cpython-37m-arm-linux-gnueabihf.so
/usr/bin/ld: -lssl kann nicht gefunden werden
/usr/bin/ld: -lcrypto kann nicht gefunden werden
collect2: error: ld returned 1 exit status
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pymssql
Running setup.py clean for pymssql
I've already tried to build freeTDS from source code, which also didn't helped.
Can someone help me to install pymssql on Raspberry Pi?
For those who had the same error, you have to install libssl-dev.
sudo apt-get install libssl-dev
I am trying to deploy a django project, which makes use of MSSQL Server. I am trying to deploy it using AWS Elastic Beanstalk. If anyone could help me out I would really appreciate it.
I have GCC and G++ working on my computer, so I am not sure why that is causing any problems here. I searched around and wasnt able to find any solution that is directly related to mine, and I am not sure where to move forward from here.
Here is the requirements.txt
astroid==1.6.5
awsebcli==3.14.6
botocore==1.12.9
cement==2.8.2
colorama==0.3.9
Django==2.0.6
django-mssql==1.8
django-pyodbc-azure==2.0.6.1
django-sendgrid-v5==0.6.893
docutils==0.14
future==0.16.0
isort==4.3.4
jmespath==0.9.3
lazy-object-proxy==1.3.1
mccabe==0.6.1
mysql-connector-python-rf==2.2.2
pathspec==0.5.5
pylint==1.9.2
PyMySQL==0.8.1
pyodbc==4.0.23
pypyodbc==1.3.3.1
python-dateutil==2.7.3
python-http-client==3.1.0
pytz==2018.5
PyYAML==3.13
semantic-version==2.5.0
sendgrid==5.4.1
six==1.11.0
style==1.1.0
termcolor==1.1.0
update==0.0.1
urllib3==1.22
wrapt==1.10.11
This is my log, specifically the eb-activity section
/var/log/eb-activity.log
Running setup.py bdist_wheel for pyodbc: started
Running setup.py bdist_wheel for pyodbc: finished with status 'error'
Complete output from command /opt/python/run/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-1cdwy0uv/pyodbc/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/tmpxf7u3lwwpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=4.0.23 -I/usr/include/python3.6m -c src/pyodbcmodule.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcmodule.o -Wno-write-strings
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command 'gcc' failed with exit status
Failed building wheel for pyodbc
Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc, django-pyodbc-azure, future, python-http-client, sendgrid, django-sendgrid-v5, isort, mccabe, mysql-connector-python-rf, pylint, PyMySQL, pypyodbc, style, update
Running setup.py install for pyodbc: started
Running setup.py install for pyodbc: finished with status 'error'
Complete output from command /opt/python/run/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-1cdwy0uv/pyodbc/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-wpg4l1dm-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python3.6/pyodbc:
running install
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=4.0.23 -I/usr/include/python3.6m -c src/pyodbcmodule.cpp -o build/temp.linux-x86_64-3.6/src/pyodbcmodule.o -Wno-write-strings
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command 'gcc' failed with exit status 1
If you do not already have a .ebextensions directory, then create one, and add a file named 01_packages.config to it with the following content:
packages:
yum:
gcc-c++: []
unixODBC-devel: []
When you run eb deploy at your console, then the config files in the .ebextensions directory will be processed before AWS runs pip install on your requirements.txt file, and you should have the right packages installed for your pypyodbc==1.3.3.1 requirement.
sudo python3 -m pip install textract
sudo apt-get install textract
pip install textract
sudo apt-get install swig
I want to install textract in python3 but it is not install proper way, it gives the following error.
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python2.7 -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-2.7/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python2.7 -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:30: fatal error: pulse/pulseaudio.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Follow these steps:
Download the source file for textract from: https://pypi.python.org/pypi/textract
pip3 install pdfminer3k
untar the downloaded file
cd into the directory
run: python3 setup.py install
You will need to install the libpulse-dev in Ubuntu or pulseaudio-libs-devel in Fedora first.
If you are in Ubuntu try sudo apt-get install libpulse-dev
If you are in Fedora try sudo dnf install pulseaudio-libs-devel
At least this works for me.
First install pip in conda. python -m pip install --upgrade pip
then install textract, pip install textract
Late reply, but instead of pip you should check out conda it's much more encapsulated in regards to installing this package.
To install this package with conda run one of the following:
conda install -c conda-forge textract
conda install -c conda-forge/label/cf201901 textract
conda install -c conda-forge/label/cf202003 textract
Source:
https://anaconda.org/conda-forge/textract
You can install it using the following command:
pip install git+https://github.com/deanmalmgren/textract.git
When trying to build, I get the following error.
I truncated all errors past not finding the include file.
What am I missing?
python setup.py build
WARNING: WXWIN not set in environment. Assuming '..'
Found wx-config: /usr/local/bin/wx-config
Using flags: --toolkit=gtk2 --unicode=yes --version=2.8
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
running build
running build_py
copying wx/__version__.py -> build-gtk2.unicode/lib.linux-x86_64-2.6/wx
copying wx/build/build_options.py -> build-gtk2.unicode/lib.linux-x86_64-2.6/wx/build
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
building '_stc' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Iinclude -Isrc -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.6 -c contrib/stc/gtk/stc_wrap.cpp -o build-gtk2.unicode/temp.linux-x86_64-2.6/contrib/stc/gtk/stc_wrap.o -pthread -O3 -pthread
contrib/stc/gtk/stc_wrap.cpp:2680:24: error: wx/stc/stc.h: No such file or directory
I found a good start to this here. http://wxpython.org/BUILD-2.8.html
I don't have a WXDIR variable. When I tried to run from the bld directory, it didn't work. So I tried again from the source directory. My configure line was much simpler.
./configure --with-gtk --enable-unicode
The key that I didn't understand before, was that if I wanted stc. I needed to compile and install it separately.
make
make -C contrib/src/stc
sudo make install
sudo make -C contrib/src/stc install
The author's .make file with
make $* \
&& make -C contrib/src/stc $*
works well too.
Remember to also run
sudo ldconfig
If you need other contrib stuff, look in the contrib/src directory for what is available.
Then cd to the wxPython directory. The standard
python setup.py build
python setup.py install
appear to work.
After all of this, I still needed to set my LD_LIBRARY_PATH to /usr/local/lib. I was then able run the application I was trying to install all along, which was ride, a GUI editor for robot-framework.
The point of this exercise was to wxPython 2.8.12.1 on CenOS 6. I could not find a workable binary to install. After I build the project, I found an acceptable place to get the binary. I wish that http://www.wxpython.org/ would point to this location as well. The Extra packages for Enterprise Linux (EPEL) has this project and others here: https://fedoraproject.org/wiki/EPEL .
An easy way to install them is to:
# yum install epel-release
# yum install wxPython
The first adds epel-release to your yum repository. The second installs wxPython. The binaries on the wxPython web site require a different gcc shared library. Using this repository ensures a match.
I am trying to install the tm package in R but this depends on a package slam which I am having trouble installing. The error attached below cannot find -lRblas. What do I need to install on my distro so that I get this library?
Error Message
install.packages("slam")
Installing package into ‘/home/eroche/R/x86_64-redhat-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/slam_0.1-32.tar.gz'
Content type 'application/x-gzip' length 46672 bytes (45 Kb)
opened URL
==================================================
downloaded 45 Kb
* installing *source* package ‘slam’ ...
** package ‘slam’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c apply.c -o apply.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c grouped.c -o grouped.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c sparse.c -o sparse.o
gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c util.c -o util.o
gcc -m64 -std=gnu99 -shared -Wl,-z,relro -o slam.so apply.o grouped.o sparse.o util.o -L/usr/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lRblas
collect2: error: ld returned 1 exit status
make: *** [slam.so] Error 1
ERROR: compilation failed for package ‘slam’
* removing ‘/home/eroche/R/x86_64-redhat-linux-gnu-library/3.1/slam’
Warning in install.packages :
installation of package ‘slam’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpGsb0e4/downloaded_packages’
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-redhat-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_IE.UTF-8 LC_NUMERIC=C LC_TIME=en_IE.UTF-8 LC_COLLATE=en_IE.UTF-8 LC_MONETARY=en_IE.UTF-8
[6] LC_MESSAGES=en_IE.UTF-8 LC_PAPER=en_IE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_IE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.1.1
Please try to install BLAS math libraries with following command.
yum install blas-devel
Then you should try to reinstall slam.