vatic
vatic copied to clipboard
Instructions for OSX
Installation on OSX
The following procedure shows how to install Vatic on OSX with Anaconda Python and Homebrew. The rest of the instructions for using turkic remains the same as mentioned in README.
Author: Varun Nagaraja ([email protected])
Dependencies
- OpenSSL installed via Homebrew will not be linked as OSX already provides one. Hence you need to force link it.
$ brew install openssl
$ brew link —force openssl
- MySQL
$ brew install mysql
$ mysql.server start
- Apache
$ brew install httpd24
$ brew tap home-brew/apache
$ brew update
Before installing mod_wsgi execute the command to create symlink as mentioned on https://github.com/Homebrew/homebrew-apache
$ brew install mod_wsgi
- Other python packages
$ pip install sqlalchemy parsedatetime
Download Vatic
$ wget http://mit.edu/vondrick/vatic/vatic-install.sh
$ chmod +x vatic-install.sh
$ ./vatic-install.sh
$ cd vatic
Setup Apache
Edit /etc/apache2/httpd.conf
- to include
LoadModule wsgi_module /usr/local/Cellar/mod_wsgi/3.4/libexec/mod_wsgi.so
- uncomment
Include /private/etc/apache2/extra/httpd-vhosts.conf
On Yosemite, you will also have to uncomment
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
Edit etc/apache2/extra/httpd-vhosts.conf
instead of sites-enabled/000-default
as done on Linux.
Remember to set the right path for anaconda python.
WSGIDaemonProcess www-data python-eggs=/tmp/.python-eggs
WSGIProcessGroup www-data
WSGIPythonHome /Users/<username>/anaconda
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Library/WebServer/vatic/public
WSGIScriptAlias /server /Library/WebServer/vatic/server.py
CustomLog /var/log/apache2/access.log combined
<Directory "/Library/WebServer/vatic">
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
#For Yosemite
Require all granted
#For Mavericks, uncomment the below two lines and comment the above Require line
#Order allow,deny
#Allow from all
</Directory>
</VirtualHost>
Restart the apache server
$ sudo apachectl graceful
Setup MySQL
$ mysql -u root
mysql> create database vatic;
Setup Vatic
Copy vatic folder to /Library/WebServer/vatic
so that you do not have to provide write access to folders inside the home directory.
Videos
- The video frames should also be in a public folder like
/Library/WebServer/vatic
- On OSX, there might be some hidden folders with the name
.DS_STORE
created after extracting and moving the frames folder. Turkic will throw errors incli.py
. For now, you can just delete that.DS_STORE
folder.
Permissions
- The home directory should have both read and execute permissions so that the anaconda python directory is accessible by the apache server.
- Ensure that private and sensitive folders inside the home directory have no read permission for others except you.
P.S: If things don’t work check /var/log/apache2/error.log
. It tells you if there is any module that is not accessible or missing.
I thought this might be helpful for others trying to install on OSX. It would be nice to add it in either README_OSX or in the existing README.
Possible typo:
brew tap home-brew/apache
Should be:
brew tap homebrew/apache
Another small typo:
Edit etc/apache2/extra/httpd-vhosts.conf
Should be:
Edit /etc/apache2/extra/httpd-vhosts.conf
Thanks for the fixes Chris.
The .sh file contains apt-get install commands. Replacing it with brew leads to certain conflicts. Also packages like mysql and python packages parsedatetime are installed again by calling the .sh file. Brew could not dig up libavcodec and stuff. Is it possible to release a .sh installer which address all these and does every installation on the fly ?
I add some python import errors in my apache error.log and adding python-eggs=/path/.python-eggs fixed it! Thank
Also i had brew install mod_wsgi --with-homebrew-httpd24 --with-homebrew-python
otherwise i was getting a conflict error from mod_wsgi because of not using the brew python!
@corentin87 Hi, do you know why i always got No nodule named parsedatetime as the following show:
beans@Beans:~/Annotation/vatic$ turkic setup --database
Traceback (most recent call last):
File "/usr/local/bin/turkic", line 5, in
import parsedatetime
Any idea about this problem? Thank you very much.