Installation mod_wsgi for python3.2 - apache

I`m trying to install mod_wsgi for Python 3.2 on Debian 6 (Squeeze).
First I installed libapache2-mod-wsgi-py3 from default repository, and it was for Python3.1, then I add to source.list
*deb http://ftp.de.debian.org/debian wheezy main*
and call apt-get install libapache2-mod-wsgi-py3 again. After that sys.version in wsgi returs 3.2.3.
Is it truly mod-wsgi works with Python3.2 or that just bug?

If wishing to use Python 3.2, you must compile mod_wsgi from source code out of the mod_wsgi source code repository. Last tar ball and binary packages from distros wouldn't support 3.2.

Related

How to install SASL with Python 3.8?

I am trying to install sasl3-0.2.11 python package on a windows 10 machine (64 bit).
It is failing with a C1083 fatal error.
Due to some proxies and me not being able to avoid them, I am installing it by downloading the tar.gz from pypi, logging into the uncompressed folder and doing python setup.py install.
This solution worked for all modules but sasl.
I have then read this useful comment but the .whl from Cyrus Sasl did not work too. They suppot until 3.7 python, not 3.8.
I am really wondering how can I bypass this issue or could I avoid sasl for being able to use Pyhive.
Thanks in advance.
Nourou
Finally, I just uninstalled Python 3.8 and install the 3.7.
Then, I was able to install Sasl via the wheel file here
You just need to install the following packages on Ubuntu:
apt-get install libsasl2-dev libsasl2-2 libsasl2-modules-gssapi-mit

Error installing library of Scrapy in PyCharm

I can install other packages, but can't install Scrapy. I get the following errors:
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'lxml.etree' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
However, C++ is installed, which I installed numerous of times. I have x86 and 64 bit installations (not sure if it's 10.0) but I have 2013-2017 versions installed.
Please upgrade your pip by following command.
python -m pip install --upgrade pip
Then install Scrapy by following command.
pip install Scrapy
download latest twisted package and install with pip.
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
after that install scrapy
In my case, I found that pywin32 was not installed...
So I did
download the latest Twisted package from https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
You want to use the amd64 if you have Windows 64 (regardless if it's an Intel processor or not)
You can use any browser for the download and copy/paste the file into the project folder of your current pycharm project.
Then in pycharm type this:
pip install Twisted-20.3.0-cp39-cp39-win_amd64.whl
(assuming that your package was Twisted-20.3.0-cp39-cp39-win_amd64.whl)
then proceed with:
pip install Scrapy

I just installed graphite on my mac, but some fonts are huge

I just installed graphite on OSX, and managed to get the web app running this command:
python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite
I'll eventually move it to ubuntu, but in the mean time, some fonts are enormous:
Any thoughts on how to fix this?
I chased this down to an issue with the newest version of cairo. I removed cairo and installed 1.12.6. I posted the instructions here gist.github.com/relaxdiego/7539911
Its the cairocffi that handles the fonts and other display parameters. Sometimes installing only cairo doesn't work. In the above case you should always troubleshoot by ensuring proper and complete installation of the cairocffi package. By complete I mean all the dependencies for cairocffi.
The frequently required are:
1. libffi-devel (for rpm based operating systems)
sudo yum install libffi-devel
2. libffi-dev (for debian based operating systems)
sudo apt-get install libffi-dev
3. parse_lookup
sudo pip install parse_lookup
This is the Github page for cairocffi.

Update Mono via CentOS

Hello i have CentOS and im trying my damnedest to update Mono i have version 1.2.4 at the moment some how, and im trying to compile something via xbuild and it isn't working im thinking because im using to old a version of mono.
Please BEFORE you link me ANY guide, if it links to the ftp.novell directory it no longer works, that directory is all scrapped. So i dont even know where to get a proper tarball for it now because on their site it only shows opensuse and such? Not CentOS like there used to be.
Can anyone help me with this :\
What version of CentOS are you using? 4?
The instructions below were tested on CentOS 5.9. They will also work fine on the latest CentOS version (6.4 as of this writing) and I imagine they would work with older versions as well.
Head over to /usr/src as root
su
cd /usr/src
Ensure GCC and friends are installed (to build the Mono source code)
yum install gcc gcc-c++ bison
Grab and unpack the Mono source code
wget http://download.mono-project.com/sources/mono/mono-3.0.7.tar.bz2
tar -xvjf mono-3.0.7.tar.bz2
Build and install Mono
cd mono-3.0.7
./configure --prefix=/usr
make && make install
Verify that you have a working Mono installation with mono --version and mcs --version
Build the GDI+ compatibility layer (required for System.Drawing)
yum install glib2-devel libX11-devel pixman-devel fontconfig-devel freetype-devel libexif-devel libjpeg-devel glib2-devel libtif-devel libpng-devel giflib-devel
cd /usr/src
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
tar -xvjf libgdiplus-2.10.tar.bz2

How can I get mod_wsgi working on Mac?

I have been trying to install the latest version of mod_wsgi (3.3) since hours on my Mac. I'm on Snow Leopard and I have the versions of Apache (Apache/2.2.15) and Python 2.6.1 (r261:67515) that come with the system.
I downloaded mod_wsgi-3.3.tar.gz from http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-3.3.tar.gz
Extracted the file and executed the following through terminal:
./configure
make
sudo make install
I added LoadModule wsgi_module modules/mod_wsgi.so to my httpd.conf.
Restarted Apache by disabling and enabling Web Sharing from the control panel.
localhost stops working until I remove the line I added httpd.conf :(
Please help. Thanks in advance.
I use the homebrew installed version of mod_wsgi. That gives me a universal version of mod_wsgi that works with the vanilla apache.
➔ file `brew list mod_wsgi`
/usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so: Mach-O universal binary with 2 architectures
/usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
/usr/local/Cellar/mod_wsgi/3.2/libexec/mod_wsgi.so (for architecture i386): Mach-O bundle i386
The problem you had was the path to mod_wsgi.so. On OS X the appropriate line is
LoadModule wsgi_module libexec/apache2/mod_wsgi.so
With the latest Mac OS and most recent HomeBrew, the package isn't available on HomeBrew.
However, if you have Python3 and Pip3 installed and configured on your Mac, you can load the package using:
pip3 install mod_wsgi
I had to first run the below command to get mod_wsgi installed
brew tap homebrew/apache
And then run
brew install mod_wsgi
On OS X 10.8 Mountain Lion, brew install mod_wsgi fails. This answer on stackexchange suggests the location of the XCode toolchain has changed. It fixed my problem and hopefully helps other people who end up here on 10.8 trying to install mod_wsgi.
I also encountered this error but I didn't want to use brew.
In my case the cause of the problem was in misconfiguration of python framework used for mod_wsgi that can be checked by
otool -L /usr/libexec/apache2/mod_wsgi.so
In my case it pointed to Python 2.7 framework while I was using Python 3.3 and my
python -> /usr/bin/python
also pointed to python 3.3 version.
In order to fix this, I removed already installed /usr/libexec/apache2/mod_wsgi.so .
Then reconfigured mod_wsgi with command:
./configure --with-python=/usr/bin/python --disable-framework
sudo make
sudo make install
This should work fine.
But in my case after executing make command I've got a warning about non existing Python framework folder. So I checked what was the real path of my Python framework folder and replaced it in the Makefile under LDFLAGS.
Changed from:
-L/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config
to
-L/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config-3.3m
Good way to check the Apache modules if it doesn't work, is:
apachectl -M
If some module causes the error, it will print it.
The below solution works for me for MacOS BigSur and Monterey:
Install MacPorts from https://www.macports.org/install.php
sudo port install mod_wsgi --> installs apache2, python3 among other things
apachectl location after install: /opt/local/sbin/apachectl
apache2 modules location: /opt/local/lib/apache2/modules/
httpd config location: /opt/local/etc/apache2/httpd.conf
Add this line to httpd.conf: LoadModule wsgi_module lib/apache2/modules/mod_wsgi.so
I wrote two tutorials about how to install Apache + MySQL + Python in Mac OS and Windows.
Maybe you can take a look.
[Tutorial] install Apache + MySQL + Python on Mac OS
http://fstoke.me/blog/?p=3583
[Tutorial] install Apache + MySQL + Python on Windows
http://fstoke.me/blog/?p=3600
Mac OS X comes with apache 2, to install mod_wsgi just install homebrew and run the following command.
*brew install homebrew/apache/mod_wsgi*
go to apache2/modules/ and search for mod_wsgi.so
after this goto apache2/conf/ and do
*sudo vim http.conf*
and add the following line
LoadModule wsgi_module modules/mod_wsgi.so
I was having trouble getting mod_wsgi to work as well even using different peoples advice and it wasn't working, so I finally used this website: https://pypi.python.org/pypi/mod_wsgi
Downloaded the mod_wsgi 4.5.15 file
Opened the file in a location I liked
Went to folder location in terminal
Did python3 setup.py install (or python if you're using a different version)
I have a MacBook Pro Version 10.12.5 in case this helps anyone.