I can't seem to get Fabric running correctly. I found this article which doesn't solve the issue for me Getting Fabric Python Library to Work
I installed Python using Homebrew brew install python (this also installs PIP):
Running which python I get:
/usr/local/Cellar/python/2.7.3/bin/python
I then installed fabric pip install fabric
Requirement already satisfied (use --upgrade to upgrade): fabric in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): ssh>=1.7.14 in /usr/local/lib/python2.7/site-packages (from fabric)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.1,!=2.4 in /usr/local/lib/python2.7/site-packages (from ssh>=1.7.14->fabric)
The other article suggests that fabric will be located at /usr/local/Cellar/python/2.7.1/bin/fab
Doing an ls on the above (but 2.7.3 in my case) gets the following (no fabric).
lrwxr-xr-x 1 darron staff 80 Oct 26 17:37 2to3 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/2to3
lrwxr-xr-x 1 darron staff 82 Oct 26 17:37 2to3-2 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/2to3-2
lrwxr-xr-x 1 darron staff 84 Oct 26 17:37 2to3-2.7 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/2to3-2.7
-r-xr-xr-x 1 darron staff 422 Oct 26 17:37 easy_install
-r-xr-xr-x 1 darron staff 430 Oct 26 17:37 easy_install-2.7
lrwxr-xr-x 1 darron staff 80 Oct 26 17:37 idle -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/idle
lrwxr-xr-x 1 darron staff 81 Oct 26 17:37 idle2 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/idle2
lrwxr-xr-x 1 darron staff 83 Oct 26 17:37 idle2.7 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/idle2.7
-r-xr-xr-x 1 darron staff 380 Oct 26 17:37 pip
-r-xr-xr-x 1 darron staff 388 Oct 26 17:37 pip-2.7
lrwxr-xr-x 1 darron staff 81 Oct 26 17:37 pydoc -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/pydoc
lrwxr-xr-x 1 darron staff 82 Oct 26 17:37 pydoc2 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/pydoc2
lrwxr-xr-x 1 darron staff 84 Oct 26 17:37 pydoc2.7 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/pydoc2.7
lrwxr-xr-x 1 darron staff 82 Oct 26 17:37 python -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python
lrwxr-xr-x 1 darron staff 89 Oct 26 17:37 python-config -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python-config
lrwxr-xr-x 1 darron staff 83 Oct 26 17:37 python2 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2
lrwxr-xr-x 1 darron staff 90 Oct 26 17:37 python2-config -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2-config
lrwxr-xr-x 1 darron staff 85 Oct 26 17:37 python2.7 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x 1 darron staff 92 Oct 26 17:37 python2.7-config -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
lrwxr-xr-x 1 darron staff 83 Oct 26 17:37 pythonw -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/pythonw
lrwxr-xr-x 1 darron staff 84 Oct 26 17:37 pythonw2 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/pythonw2
lrwxr-xr-x 1 darron staff 86 Oct 26 17:37 pythonw2.7 -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
lrwxr-xr-x 1 darron staff 84 Oct 26 17:37 smtpd.py -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/smtpd.py
lrwxr-xr-x 1 darron staff 87 Oct 26 17:37 smtpd2.7.py -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/smtpd2.7.py
lrwxr-xr-x 1 darron staff 85 Oct 26 17:37 smtpd2.py -> /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/smtpd2.py
I've located the actual install at /usr/local/lib/python2.7/site-packages
drwxr-xr-x 14 darron staff 476 Oct 26 17:41 Crypto
drwxr-xr-x 9 darron staff 306 Oct 26 17:41 Fabric-1.4.3-py2.7.egg-info
drwxr-xr-x 10 darron staff 340 Oct 26 17:37 distribute-0.6.28-py2.7.egg
-rw-r--r-- 1 darron staff 237 Oct 26 17:37 easy-install.pth
drwxr-xr-x 10 darron staff 340 Oct 26 17:41 fabfile
drwxr-xr-x 41 darron staff 1394 Oct 26 17:41 fabric
drwxr-xr-x 7 darron staff 238 Oct 22 08:13 git_remote_helpers
lrwxr-xr-x 1 darron staff 93 Oct 22 08:13 git_remote_helpers-0.1.0-py2.7.egg-info -> ../../../Cellar/git/1.8.0/lib/python2.7/site-packages/git_remote_helpers-0.1.0-py2.7.egg-info
drwxr-xr-x 4 darron staff 136 Oct 26 17:37 pip-1.2.1-py2.7.egg
drwxr-xr-x 7 darron staff 238 Oct 26 17:41 pycrypto-2.6-py2.7.egg-info
-rw-r--r-- 1 darron staff 144 Oct 26 17:37 setuptools-0.6c11-py2.7.egg-info
-rw-r--r-- 1 darron staff 34 Oct 26 17:37 setuptools.pth
-rw-r--r-- 1 darron staff 1224 Oct 26 17:37 sitecustomize.py
-rw-r--r-- 1 darron staff 600 Oct 26 17:37 sitecustomize.pyc
drwxr-xr-x 72 darron staff 2448 Oct 26 17:41 ssh
drwxr-xr-x 8 darron staff 272 Oct 26 17:41 ssh-1.7.14-py2.7.egg-info
My question is how do I get it working? Running fab at the prompt gets me:
-bash: fab: command not found
Note - my paths are set in /etc/paths like so:
/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
The link you posted is outdated. fab should be located in the /usr/local/share/python directory -- that's where Homebrew's Python puts scripts from installed modules. Add /usr/local/share/python to your PATH.
Related
I'm trying to create a service using systemctl on my CentOS 7 server.
In /usr/lib/systemd/system I've this situation ...
[root#centos-4gb-hel1-1 system]# pwd
/usr/lib/systemd/system
[root#centos-4gb-hel1-1 system]# ls -la getUpdatesTelegram.sh
-rwxr-xr-x. 1 root root 116 Oct 24 22:32 getUpdatesTelegram.sh
[root#centos-4gb-hel1-1 system]# cat getUpdatesTelegram.sh
#!/bin/bash
while true ; do
/var/www/html/OpenProntoSoccorsi/TelegramBot/getUpdates_launcher.sh
sleep 5
done
[root#centos-4gb-hel1-1 system]#
If I try to execute
/var/www/html/OpenProntoSoccorsi/TelegramBot/getUpdates_launcher.sh
all works fine.
In /etc/systemd/system I've this ....
[root#centos-4gb-hel1-1 system]# cd /etc/systemd/system
[root#centos-4gb-hel1-1 system]# ls -la
total 40
drwxr-xr-x. 10 root root 4096 Oct 24 22:05 .
drwxr-xr-x. 4 root root 4096 Oct 18 22:41 ..
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 basic.target.wants
lrwxrwxrwx. 1 root root 37 Sep 24 12:29 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 default.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:27 dev-virtio\x2dports-org.qemu.guest_agent.0.device.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 getty.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 local-fs.target.wants
drwxr-xr-x. 2 root root 4096 Oct 24 22:32 multi-user.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 sysinit.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 system-update.target.wants
[root#centos-4gb-hel1-1 system]# cd multi-user.target.wants/
[root#centos-4gb-hel1-1 multi-user.target.wants]# ls -la
total 8
drwxr-xr-x. 2 root root 4096 Oct 24 22:32 .
drwxr-xr-x. 10 root root 4096 Oct 24 22:05 ..
lrwxrwxrwx. 1 root root 38 Sep 24 12:27 auditd.service -> /usr/lib/systemd/system/auditd.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:31 brandbot.path -> /usr/lib/systemd/system/brandbot.path
lrwxrwxrwx. 1 root root 39 Sep 24 12:27 chronyd.service -> /usr/lib/systemd/system/chronyd.service
lrwxrwxrwx. 1 root root 44 Sep 24 12:33 cloud-config.service -> /usr/lib/systemd/system/cloud-config.service
lrwxrwxrwx. 1 root root 43 Sep 24 12:33 cloud-final.service -> /usr/lib/systemd/system/cloud-final.service
lrwxrwxrwx. 1 root root 48 Sep 24 12:33 cloud-init-local.service -> /usr/lib/systemd/system/cloud-init-local.service
lrwxrwxrwx. 1 root root 42 Sep 24 12:33 cloud-init.service -> /usr/lib/systemd/system/cloud-init.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:26 crond.service -> /usr/lib/systemd/system/crond.service
lrwxrwxrwx. 1 root root 50 Oct 24 22:32 getUpdatesTelegram.service -> /usr/lib/systemd/system/getUpdatesTelegram.service
lrwxrwxrwx. 1 root root 42 Sep 24 12:27 irqbalance.service -> /usr/lib/systemd/system/irqbalance.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:29 kdump.service -> /usr/lib/systemd/system/kdump.service
lrwxrwxrwx. 1 root root 40 Sep 24 12:26 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx. 1 root root 46 Sep 24 12:31 rhel-configure.service -> /usr/lib/systemd/system/rhel-configure.service
lrwxrwxrwx. 1 root root 39 Sep 24 12:26 rsyslog.service -> /usr/lib/systemd/system/rsyslog.service
lrwxrwxrwx. 1 root root 36 Sep 24 12:27 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:26 tuned.service -> /usr/lib/systemd/system/tuned.service
[root#centos-4gb-hel1-1 multi-user.target.wants]# cat getUpdatesTelegram.service
[Service]
Type=simple
ExecStart=/bin/bash /bin/getUpdatesTelegram.sh
[Install]
WantedBy=multi-user.target
[root#centos-4gb-hel1-1 multi-user.target.wants]#
When I try to execute
systemctl enable getUpdatesTelegram.service
I obtain
...
...
getUpdatesTelegram.service loaded failed failed getUpdatesTelegram.service
...
...
The log I've is tthe follow ....
[root#centos-4gb-hel1-1 multi-user.target.wants]# journalctl -u getUpdatesTelegram.service
-- Logs begin at Fri 2018-10-19 20:09:02 CEST, end at Wed 2018-10-24 22:44:11 CEST. --
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Started getUpdatesTelegram.service.
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Starting getUpdatesTelegram.service...
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: getUpdatesTelegram.service: main process exited, code=exited, status=203/EXEC
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Unit getUpdatesTelegram.service entered failed state.
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: getUpdatesTelegram.service failed.
Where I'm wrong?
Thank you in advance!
First, custom services should not be put in /usr/lib/systemd/system, but in /etc/systemd/system. Same goes with shell scripts, just put them into /usr/local/sbin or something.
The reason why this does not work is that the script path in your service file getUpdatesTelegram.service is wrong:
ExecStart=/bin/bash /bin/getUpdatesTelegram.sh
should really be
ExecStart=/bin/bash /usr/lib/systemd/system/getUpdatesTelegram.sh
(Though as I wrote, don't put shell scripts into /usr/lib/systemd/system)
As a Red Hat fork, CentOS tends to follow similar guidelines.
The Red Hat system administrator's guide offers this useful paragraph for your situation.
The solution proposed by Jakob is correct by the way.
I can import many things as the code below shows, but if I uncomment the imports two that are commented out, I get errors
[idf#node1 cboe]$ python pandas_pyql.py
Traceback (most recent call last):
File "pandas_pyql.py", line 33, in <module>
from quantlib.instruments.api import EuropeanOption
File "/home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/instruments/api.py", line 1, in <module>
from .bonds import FixedRateBond, ZeroCouponBond
File "quantlib/indexes/ibor_index.pxd", line 12, in init quantlib.instruments.bonds (quantlib/instruments/bonds.cpp:6651)
ImportError: /home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/indexes/ibor_index.so: undefined symbol: _ZNK8QuantLib9IborIndex21businessDayConventionEv
[idf#node1 cboe]$
[idf#node1 cboe]$ python pandas_pyql.py
Traceback (most recent call last):
File "pandas_pyql.py", line 36, in <module>
from quantlib.termstructures.yields.api import FlatForward
File "/home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/termstructures/yields/api.py", line 1, in <module>
from .bond_helpers import BondHelper, FixedRateBondHelper
File "quantlib/termstructures/yields/bond_helpers.pyx", line 1, in init quantlib.termstructures.yields.bond_helpers (quantlib/termstructures/yields/bond_helpers.cpp:4617)
ImportError: /home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/termstructures/yields/rate_helpers.so: undefined symbol: _ZN8QuantLib14SwapRateHelperC1ERKNS_6HandleINS_5QuoteEEERKNS_6PeriodERKNS_8CalendarENS_9FrequencyENS_21BusinessDayConventionERKNS_10DayCounterERKN5boost10shared_ptrINS_9IborIndexEEES5_S8_RKNS1_INS_18YieldTermStructureEEE
[idf#node1 cboe]$
import quantlib.reference.names as nm
from quantlib.pricingengines.blackformula import blackFormulaImpliedStdDev
from quantlib.instruments.option import EuropeanExercise, VanillaOption
from quantlib.instruments.payoffs import PlainVanillaPayoff, Put, Call
from quantlib.models.equity.heston_model import HestonModel
from quantlib.pricingengines.vanilla.vanilla import AnalyticHestonEngine
from quantlib.processes.heston_process import HestonProcess
from quantlib.quotes import SimpleQuote
from quantlib.settings import Settings
from quantlib.util.converter import pydate_to_qldate, df_to_zero_curve
#from quantlib.instruments.api import EuropeanOption
from quantlib.pricingengines.api import AnalyticEuropeanEngine
from quantlib.processes.api import BlackScholesMertonProcess
#from quantlib.termstructures.yields.api import FlatForward
from quantlib.termstructures.volatility.api import BlackConstantVol
from quantlib.time.api import today, NullCalendar, ActualActual
from quantlib.time.date import (Period, Days)
from quantlib.mlab.util import common_shape, array_call
EDIT 1
This is my /usr/local/lib
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libczmq.so -> libczmq.so.1.1.0
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libczmq.so.1 -> libczmq.so.1.1.0
-rwxr-xr-x. 1 root root 780174 Apr 24 2015 libczmq.so.1.1.0
-rwxr-xr-x. 1 root root 927 Apr 24 2015 libfix8.la
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libfix8.so -> libfix8.so.1.0.3
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libfix8.so.1 -> libfix8.so.1.0.3
-rwxr-xr-x. 1 root root 7784908 Apr 24 2015 libfix8.so.1.0.3
lrwxrwxrwx 1 root root 19 Jul 17 2015 libgdiplus.so -> libgdiplus.so.0.0.0
lrwxrwxrwx 1 root root 19 Jul 17 2015 libgdiplus.so.0 -> libgdiplus.so.0.0.0
-rwxr-xr-x 1 root root 424120 Mar 9 2015 libgdiplus.so.0.0.0
-rwxr-xr-x. 1 root root 939 Apr 24 2015 libhftest.la
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libhftest.so -> libhftest.so.0.0.0
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libhftest.so.0 -> libhftest.so.0.0.0
-rwxr-xr-x. 1 root root 2834313 Apr 24 2015 libhftest.so.0.0.0
-rwxr-xr-x. 1 root root 209608 Apr 24 2015 libkj-0.6-dev.so
-rw-r--r--. 1 root root 334352 Apr 24 2015 libkj.a
-rwxr-xr-x. 1 root root 359914 Apr 24 2015 libkj-async-0.6-dev.so
-rw-r--r--. 1 root root 528718 Apr 24 2015 libkj-async.a
-rwxr-xr-x. 1 root root 1002 Apr 24 2015 libkj-async.la
lrwxrwxrwx. 1 root root 22 Apr 24 2015 libkj-async.so -> libkj-async-0.6-dev.so
-rwxr-xr-x. 1 root root 936 Apr 24 2015 libkj.la
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libkj.so -> libkj-0.6-dev.so
-rwxr-xr-x. 1 root root 57925 Apr 24 2015 libkj-test-0.6-dev.so
-rw-r--r--. 1 root root 71578 Apr 24 2015 libkj-test.a
-rwxr-xr-x. 1 root root 995 Apr 24 2015 libkj-test.la
lrwxrwxrwx. 1 root root 21 Apr 24 2015 libkj-test.so -> libkj-test-0.6-dev.so
-rw-r--r-- 1 root root 550804 Jul 3 2015 libpfring.a
-rwxr-xr-x 1 root root 421488 Jul 3 2015 libpfring.so
lrwxrwxrwx. 1 root root 24 Apr 24 2015 libPocoFoundationd.so -> libPocoFoundationd.so.30
-rwxr-xr-x. 1 root root 10145915 Apr 24 2015 libPocoFoundationd.so.30
lrwxrwxrwx. 1 root root 23 Apr 24 2015 libPocoFoundation.so -> libPocoFoundation.so.30
-rwxr-xr-x. 1 root root 2006896 Apr 24 2015 libPocoFoundation.so.30
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libPocoJSONd.so -> libPocoJSONd.so.30
-rwxr-xr-x. 1 root root 2318379 Apr 24 2015 libPocoJSONd.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoJSON.so -> libPocoJSON.so.30
-rwxr-xr-x. 1 root root 327936 Apr 24 2015 libPocoJSON.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoNetd.so -> libPocoNetd.so.30
-rwxr-xr-x. 1 root root 7169896 Apr 24 2015 libPocoNetd.so.30
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libPocoNet.so -> libPocoNet.so.30
-rwxr-xr-x. 1 root root 1209648 Apr 24 2015 libPocoNet.so.30
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libPocoUtild.so -> libPocoUtild.so.30
-rwxr-xr-x. 1 root root 3264471 Apr 24 2015 libPocoUtild.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoUtil.so -> libPocoUtil.so.30
-rwxr-xr-x. 1 root root 473760 Apr 24 2015 libPocoUtil.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoXMLd.so -> libPocoXMLd.so.30
-rwxr-xr-x. 1 root root 2927891 Apr 24 2015 libPocoXMLd.so.30
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libPocoXML.so -> libPocoXML.so.30
-rwxr-xr-x. 1 root root 596408 Apr 24 2015 libPocoXML.so.30
-rw-r--r-- 1 root root 54723484 Mar 27 13:42 libprotobuf.a
-rwxr-xr-x 1 root root 972 Mar 27 13:42 libprotobuf.la
-rw-r--r-- 1 root root 4638676 Mar 27 13:42 libprotobuf-lite.a
-rwxr-xr-x 1 root root 1007 Mar 27 13:42 libprotobuf-lite.la
lrwxrwxrwx 1 root root 26 Mar 27 13:42 libprotobuf-lite.so -> libprotobuf-lite.so.10.0.0
lrwxrwxrwx 1 root root 26 Mar 27 13:42 libprotobuf-lite.so.10 -> libprotobuf-lite.so.10.0.0
-rwxr-xr-x 1 root root 2005147 Mar 27 13:42 libprotobuf-lite.so.10.0.0
lrwxrwxrwx 1 root root 21 Mar 27 13:42 libprotobuf.so -> libprotobuf.so.10.0.0
lrwxrwxrwx 1 root root 21 Mar 27 13:42 libprotobuf.so.10 -> libprotobuf.so.10.0.0
-rwxr-xr-x 1 root root 21758102 Mar 27 13:42 libprotobuf.so.10.0.0
-rw-r--r-- 1 root root 96605238 Mar 27 13:42 libprotoc.a
-rwxr-xr-x 1 root root 988 Mar 27 13:42 libprotoc.la
lrwxrwxrwx 1 root root 19 Mar 27 13:42 libprotoc.so -> libprotoc.so.10.0.0
lrwxrwxrwx 1 root root 19 Mar 27 13:42 libprotoc.so.10 -> libprotoc.so.10.0.0
-rwxr-xr-x 1 root root 32484516 Mar 27 13:42 libprotoc.so.10.0.0
-rw-r--r-- 1 root root 1025743748 Jun 12 2015 libQuantLib.a
-rwxr-xr-x 1 root root 945 Jun 12 2015 libQuantLib.la
lrwxrwxrwx 1 root root 20 Jun 12 2015 libQuantLib.so -> libQuantLib.so.0.0.0
lrwxrwxrwx 1 root root 20 Jun 12 2015 libQuantLib.so.0 -> libQuantLib.so.0.0.0
-rwxr-xr-x 1 root root 365069474 Jun 12 2015 libQuantLib.so.0.0.0
This is my LD_LIBRARY_PATH
[idf#node1 cboe]$ echo $LD_LIBRARY_PATH
/opt/intel/lib/intel64:/opt/NAG/cll6i25dcl/lib:/usr/lib64:/usr/lib64/openmpi/lib:/usr/local/lib:/opt/intel/opencl/lib64:/usr/local/apr/lib:
[idf#node1 cboe]$
I was building gstreamer latest version on my raspberry pi. I wanted to have python bindings, hence I installed gobject-introspection-1.0 and pygobject-3.18.2 before compiling the gstreamer and its plugins.
At the end of the build of gstreamer and all of its plugins, I see these files:
pi#raspberrypi:~/kurento $ ls -ltr /usr/local/lib/girepository-1.0
total 580
-rw-r--r-- 1 root staff 214076 Mar 28 19:28 Gst-1.5.typelib
-rw-r--r-- 1 root staff 43712 Mar 28 19:28 GstBase-1.5.typelib
-rw-r--r-- 1 root staff 6500 Mar 28 19:28 GstController-1.5.typelib
-rw-r--r-- 1 root staff 6272 Mar 28 19:28 GstNet-1.5.typelib
-rw-r--r-- 1 root staff 13116 Mar 28 19:29 GstCheck-1.5.typelib
-rw-r--r-- 1 root staff 14460 Mar 28 20:23 GstTag-1.5.typelib
-rw-r--r-- 1 root staff 2508 Mar 28 20:23 GstFft-1.5.typelib
-rw-r--r-- 1 root staff 27460 Mar 28 20:23 GstRtp-1.5.typelib
-rw-r--r-- 1 root staff 24160 Mar 28 20:23 GstSdp-1.5.typelib
-rw-r--r-- 1 root staff 32856 Mar 28 20:23 GstRtsp-1.5.typelib
-rw-r--r-- 1 root staff 75268 Mar 28 20:23 GstVideo-1.5.typelib
-rw-r--r-- 1 root staff 46800 Mar 28 20:24 GstAudio-1.5.typelib
-rw-r--r-- 1 root staff 25764 Mar 28 20:24 GstPbutils-1.5.typelib
-rw-r--r-- 1 root staff 5732 Mar 28 20:24 GstApp-1.5.typelib
-rw-r--r-- 1 root staff 1876 Mar 28 20:24 GstAllocators-1.5.typelib
-rw-r--r-- 1 root staff 17736 Mar 28 22:37 Nice-0.1.typelib
Then I compiled gst-python-1.7.1 and then I see the following at appropriate location:
pi#raspberrypi:~/kurento $ ls -l /usr/local/lib/python2.7/site-packages/gi/overrides/
total 640
-rw-r--r-- 1 root staff 15002 Mar 28 18:11 Gdk.py
-rw-r--r-- 1 root staff 14996 Mar 28 18:11 Gdk.pyc
-rw-r--r-- 1 root staff 14996 Mar 28 18:11 Gdk.pyo
-rwxr-xr-x 1 root staff 1141 Mar 29 22:19 _gi_gst.la
-rwxr-xr-x 1 root staff 56124 Mar 29 22:19 _gi_gst.so
-rw-r--r-- 1 root staff 2240 Mar 28 18:11 GIMarshallingTests.py
-rw-r--r-- 1 root staff 2428 Mar 28 18:11 GIMarshallingTests.pyc
-rw-r--r-- 1 root staff 2428 Mar 28 18:11 GIMarshallingTests.pyo
-rw-r--r-- 1 root staff 8147 Mar 28 18:11 Gio.py
-rw-r--r-- 1 root staff 8176 Mar 28 18:11 Gio.pyc
-rw-r--r-- 1 root staff 8075 Mar 28 18:11 Gio.pyo
-rw-r--r-- 1 root staff 33233 Mar 28 18:11 GLib.py
-rw-r--r-- 1 root staff 31701 Mar 28 18:11 GLib.pyc
-rw-r--r-- 1 root staff 31656 Mar 28 18:11 GLib.pyo
-rw-r--r-- 1 root staff 26255 Mar 28 18:11 GObject.py
-rw-r--r-- 1 root staff 23401 Mar 28 18:11 GObject.pyc
-rw-r--r-- 1 root staff 23401 Mar 28 18:11 GObject.pyo
-rw-r--r-- 1 root staff 2785 Mar 29 22:19 GstPbutils.py
-rw-r--r-- 1 root staff 2584 Mar 29 22:19 GstPbutils.pyc
-rw-r--r-- 1 root staff 2584 Mar 29 22:19 GstPbutils.pyo
-rw-r--r-- 1 root staff 11570 Mar 29 22:19 Gst.py
-rw-r--r-- 1 root staff 16602 Mar 29 22:19 Gst.pyc
-rw-r--r-- 1 root staff 16602 Mar 29 22:19 Gst.pyo
-rw-r--r-- 1 root staff 56202 Mar 28 18:11 Gtk.py
-rw-r--r-- 1 root staff 64602 Mar 28 18:11 Gtk.pyc
-rw-r--r-- 1 root staff 64602 Mar 28 18:11 Gtk.pyo
-rw-r--r-- 1 root staff 12820 Mar 28 18:11 __init__.py
-rw-r--r-- 1 root staff 13128 Mar 28 18:11 __init__.pyc
-rw-r--r-- 1 root staff 13070 Mar 28 18:11 __init__.pyo
-rw-r--r-- 1 root staff 1705 Mar 28 18:11 keysyms.py
-rw-r--r-- 1 root staff 1137 Mar 28 18:11 keysyms.pyc
-rw-r--r-- 1 root staff 1137 Mar 28 18:11 keysyms.pyo
-rw-r--r-- 1 root staff 1679 Mar 28 18:11 Pango.py
-rw-r--r-- 1 root staff 1727 Mar 28 18:11 Pango.pyc
-rw-r--r-- 1 root staff 1727 Mar 28 18:11 Pango.pyo
With this setup, I expect to see Gst module being loaded from gi repository.
>>> sys.path
['/usr/local/lib/python2.7/site-packages', '', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-arm-linux-gnueabihf', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']
>>> import gi
>>> from gi.repository import Gst
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name Gst
>>> gi.require_version('Gst','1.5')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/gi/__init__.py", line 102, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available
>>>
But this is not happening. Please, your help is needed to import the Gst modules into python. Has anyone come across similar situation?
Thanks!
GObject instrospection need type descriptions located at /usr/lib/girepository-1.0
In my case I have:
/usr/lib/girepository-1.0$ ls Gst*1.5*
Gst-1.5.typelib GstFft-1.5.typelib GstRtp-1.5.typelib
GstAllocators-1.5.typelib GstGL-1.5.typelib GstRtsp-1.5.typelib
GstApp-1.5.typelib GstInsertBin-1.5.typelib GstSdp-1.5.typelib
GstAudio-1.5.typelib GstMpegts-1.5.typelib GstTag-1.5.typelib
GstBase-1.5.typelib GstNet-1.5.typelib GstVideo-1.5.typelib
GstCheck-1.5.typelib GstPbutils-1.5.typelib
GstController-1.5.typelib GstPlayer-1.5.typelib
Try installing typelib files there.
I don't have any Gst*.py files installed, with the types description is enough.
Edit
Defining GI_TYPELIB_PATH pointing it to the directory containing the typelib files, in your case /usr/local/lib/girepository-1.5, also solves the problem.
I followed all the steps indicated in the heroku site and each time I get the same error:
$ git push heroku master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (11/11), 4.12 KiB, done.
Total 11 (delta 0), reused 0 (delta 0)
! Push rejected, no Cedar-supported app detected
To git#heroku.com:glacial-mountain-3911.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:glacial-mountain-3911.git'
I've looked for other solutions, some of them have a bit differences, but none of them have run :(
Here's the structure of my project:
drwxr-xr-x 9 marcpou staff 306 28 jul 22:07 .
drwxr-xr-x 17 marcpou staff 578 28 jul 00:52 ..
drwxr-xr-x 13 marcpou staff 442 28 jul 22:09 .git
-rw-r--r-- 1 marcpou staff 24 28 jul 01:05 .gitignore
-rw-r--r-- 1 marcpou staff 32 28 jul 00:57 Procfile
drwxr-xr-x 10 marcpou staff 340 28 jul 00:58 hellodjango
-rw-r--r-- 1 marcpou staff 254 28 jul 00:56 manage.py
-rw-r--r-- 1 marcpou staff 154 28 jul 22:08 requeriments.txt
drwxr-xr-x 6 marcpou staff 204 28 jul 00:56 venv
And the content of the requeriments.txt file
Django==1.5.1
distribute==0.6.34
dj-database-url==0.2.2
dj-static==0.0.5
django-toolbelt==0.0.1
gunicorn==17.5
psycopg2==2.5.1
static==0.4
wsgiref==0.1.2
And that's the content of the Procfile
web: gunicorn hellodjango.wsgi
I see that the file "hellodjango.wsgi" don't exist on my project. What should be the content? These are the files of my project.
-rw-r--r-- 1 marcpou staff 0 28 jul 00:56 __init__.py
-rw-r--r-- 1 marcpou staff 155 28 jul 00:57 __init__.pyc
-rw-r--r-- 1 marcpou staff 5869 28 jul 01:02 settings.py
-rw-r--r-- 1 marcpou staff 2876 28 jul 00:58 settings.pyc
-rw-r--r-- 1 marcpou staff 571 28 jul 00:56 urls.py
-rw-r--r-- 1 marcpou staff 293 28 jul 00:58 urls.pyc
-rw-r--r-- 1 marcpou staff 1557 28 jul 01:04 wsgi.py
-rw-r--r-- 1 marcpou staff 1059 28 jul 00:57 wsgi.pyc
The test the Push process on heroku, I've created an application, but I haven't edited anything, that means that I haven't set any database connection.
Does anybody have any idea? I suppose that the error is trivial, but I'm unable to see the error.
Thanks in advance!
I'm pretty sure that correct the spelling of requirements.txt will fix this. Then on to the next problem of adding the postgres db and PROMOTING it.
https://devcenter.heroku.com/articles/heroku-postgresql.
I am doing a django project with Sublime Text 2 on OSX-Lion. I have installed virtualenv, so my project is in "/Users/myname/Virtualenvs/"
I need to use a 'sudo' for each command (syncdb, runserver), can I change these rules whithout moving my project and is it normal ?
These are parameters after a "sudo python manage.py startproject"
Chmod infos :
drwxr-xr-x 17 root staff 578 10 jul 23:24 Platform
-rw-r--r-- 1 root staff 155648 10 jul 23:24 database.sqlite3
-rw-r--r-- 1 root staff 251 10 jul 23:09 manage.py
and in Platform :
drwxrwxr-x# 9 Nicolas staff 306 10 jul 23:13 Templates
-rw-r--r--# 1 Nicolas staff 0 4 jul 16:53 __init__.py
-rw-r--r--# 1 Nicolas staff 144 4 jul 16:54 __init__.pyc
-rw-rw-r--# 1 Nicolas staff 123 10 jul 23:13 admin.py
-rw-r--r-- 1 root staff 321 10 jul 23:24 admin.pyc
-rw-rw-r--# 1 Nicolas staff 1706 10 jul 23:13 models.py
-rw-r--r-- 1 root staff 2603 10 jul 23:22 models.pyc
-rw-r--r--# 1 Nicolas staff 5309 10 jul 23:06 settings.py
-rw-r--r-- 1 root staff 3058 10 jul 23:22 settings.pyc
-rw-r--r--# 1 Nicolas staff 639 10 jul 23:06 urls.py
-rw-r--r-- 1 root staff 784 10 jul 23:24 urls.pyc
-rw-rw-r--# 1 Nicolas staff 1895 10 jul 23:06 views.py
-rw-r--r-- 1 root staff 2745 10 jul 23:24 views.pyc
-rw-r--r--# 1 Nicolas staff 1138 10 jul 23:05 wsgi.py
-rw-r--r-- 1 root staff 1047 10 jul 23:24 wsgi.pyc
You'll need to change ownership of all the root-owned files to yourself, but otherwise there shouldn't be any need for sudo here.