- 參考官方網站的文件 Installing dependencies
- Python dependencies listed in the requirements.txt file.
- pip的相關指令可參考 User Guide — pip 8.1.2 documentation
- Odoo 相關的依賴函式庫 requirements.txt 目錄位置在
- 可以在目錄當中,按右鍵,選擇 Open In Terminal,就可以直接進入命令列模式,而且直接進入此目錄
- 下指令安裝
- 在安裝過程中,有錯誤訊息在psycopg2 的部份 查相關資料,再補上postgresql 的函式庫,sudo apt-get install postgresql-server-dev-all
- 安裝到 python-ldap 報錯,安裝 sudo apt-get install python-dev libldap2-dev libsasl2-dev libssl-dev
- 安裝到 lxml 報錯,安裝sudo apt-get install libxml2-dev libxslt1-dev python-dev
sudo apt-get install postgresql-server-dev-all
sudo apt-get install python-dev libldap2-dev libsasl2-dev libssl-dev
sudo apt-get install libxml2-dev libxslt1-dev python-dev
sudo pip install -r requirements.txt
sudo -H pip install -r requirements.txt //pip 有錯誤訊息時可用
pip install -U distribute
- 有時間的朋友可以了解,Odoo依賴的套件有哪些
Babel==1.3 Jinja2==2.7.3 Mako==1.0.1 MarkupSafe==0.23 Pillow==2.7.0 Python-Chart==1.39 PyYAML==3.11 Werkzeug==0.9.6 argparse==1.2.1 decorator==3.4.0 docutils==0.12 feedparser==5.1.3 gdata==2.0.18 gevent==1.0.2 greenlet==0.4.7 jcconv==0.2.3 lxml==3.4.1 mock==1.0.1 ofxparse==0.14 passlib==1.6.2 psutil==2.2.0 psycogreen==1.0 psycopg2==2.5.4 pyPdf==1.13 pydot==1.0.2 pyparsing==2.0.3 pyserial==2.7 python-dateutil==2.4.0 python-ldap==2.4.19 python-openid==2.2.5 pytz==2014.10 pyusb==1.0.0b2 qrcode==5.1 reportlab==3.1.44 requests==2.6.0 six==1.9.0 suds-jurko==0.6 vatnumber==1.2 vobject==0.6.6 wsgiref==0.1.2 xlwt==0.7.5
- 依官方文件安裝 Less CSS via nodejs
- 下指令安裝
sudo apt-get install -y npm
sudo sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
- 安裝完成後,可以測試一下Odoo是否能正常執行
- 進入Odoo的下載目錄,按右鍵,選擇 Open In Terminal,就進入命令列模式下 ./odoo.py指令
- 若無錯誤訊息,代表應入進入瀏灠器中觀看,網址127.0.0.1:8069
./odoo.py
- 在Odoo 9及Ubuntu 16 還需安裝以下套件
解決報表的部份
STEP 1
Download wkhtmltopdf version from wkhtmltopdf.org depend on your system arch(32 or 64 bit)
sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
STEP 2
Install the package using command
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
STEP 3
Copy wkhtmltoimage to /usr/bin location from /usr/local/bin by using below command
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
STEP 4
Copy wkhtmltopdf to /usr/bin location from /usr/local/bin by using below command
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
解決JPEG的問題
On Ubuntu:
# install libjpeg-dev with apt
sudo apt-get install libjpeg-dev
# if you're on Ubuntu 14.04, also install this
sudo apt-get install libjpeg8-dev
# reinstall pillow
pip install --no-cache-dir -I pillow
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
pip install --no-cache-dir -I pillow
沒有留言:
張貼留言