4
I am trying to run edx devstack lms on my localhost using virtualbox, vagrant.
When I try to run a command on vagrant instance in ubuntu, python env generates the error below:
error: command 'swig' failed with exit status 1
- python
- django
- vagrant
- edx
- openedx
Improve this question
edited Sep 2, 2015 at 3:45
Nathan Griffiths
12k2 gold badges34 silver badges51 bronze badges
asked Jul 9, 2015 at 6:49
GrvTyagiGrvTyagi
4,1731 gold badge34 silver badges39 bronze badges
1
-
3
exit from edx-platform and run
sudo apt-get install swigon vagrant instance solve my problem– GrvTyagi
Jul 9, 2015 at 7:08
Add a comment
|
Sorted by:
Reset to default
Your Answer
Sign up or log in
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Name
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy
Browse other questions tagged
- python
- django
- vagrant
- edx
- openedx
or ask your own question.
Browse other questions tagged
- python
- django
- vagrant
- edx
- openedx
or ask your own question.
The instructions you are following appear to have been written for a previous version of Ubuntu. This leaves us with few options.
Option 1) Attempt installation with the currently available versions of the required packages. This approach fails as of the date of this edit due to the fact that liblink-grammar5-dev is currently unavailable and is required.
Installing liblink-grammar-dev doesn’t help either and also fails.
See Option 2:
It looks like liblink-grammar4 is unavailable for 17.04 (Zesty).
It seems that for more recent versions of Ubuntu it’s been replaced by liblink-grammer5. Usually dependencies call for a version to be equal or greater than a specific version so a newer version should work.
In order to install that you need to first enable the universe repository.
Then issue the command sudo apt install liblink-grammer5
If you (like me) get an error like:
No origin found for file us.archive.ubuntu.com_ubuntu_dists_zesty-updates_main_dep11_Components-amd64.yml.gz
Then you are likely impacted by this bug or something similar. I worked around this with the command appstreamcli refresh --force
If you still get an Unable to locate package error, you can download the package directly from here and install it via gdebi with sudo gdebi PackageName or in my case sudo gdebi liblink-grammar5_5.3.14-1_amd64.deb
Your output also contains an error locating the package swig. Since we’ve already enabled the universe repository in order to obtain liblink-grammer5 we need only to issue the command sudo apt install swig to obtain that package. Now that you’ve resolved what appear to be the dependencies you should be able to successfully pip install pylinkgrammar
Option 2)
Dual boot or virtualize 16.04 and install and run pylinkgrammer on a version of Ubuntu that still offers liblink-grammer4 and liblink-grammer4-dev.
I would expect either of these approaches to work once liblink-grammar5-dev is released for 17.04, but currently (since that has yet to occur, Option 2 is your best choice.
Уведомления
- Начало
- » Python для новичков
- » CorePy &Ubuntu
#1 Авг. 25, 2010 13:48:14
CorePy &Ubuntu
Вот пытаюсь подключить модуль CorePy к python 2.6 и выполняю как написано:
After downloading CorePy, change to the root CorePy directory
($PWD/corepy-trunk if you use a subversion checkout) and execute the setup.py
script:
$ cd $COREPY
$ python setup.py build_ext -i -f
$COREPY is the path to the root of the CorePy source tree. The -i parameter is
a must – this instructs setup.py to compile the modules ‘in-place’ in the
source tree. Omitting this flag causes the compiled modules to be placed at the
top of the source tree; CorePy won’t be able to find the modules unless they
are compiled ‘in-place’.
Перешел и запустил скрипт. Распознали архитектуру и все же вот такой вывод в консоль:
gur@gur-desktop:~/COREPY$ sudo python setup.py build_ext -i -f
[sudo] password for gur:
Python platform: linux-i686
CorePy platform: x86 linuxrunning build_ext
building 'corepy.lib.extarray.extarray' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c corepy/lib/extarray/extarray.c -o build/temp.linux-i686-2.6/corepy/lib/extarray/extarray.o
In file included from corepy/lib/extarray/extarray.c:9:
corepy/lib/extarray/alloc.h:34:1: warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/limits.h:27,
from /usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/limits.h:122,
from /usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/syslimits.h:7,
from /usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/limits.h:11,
from /usr/include/python2.6/Python.h:19,
from corepy/lib/extarray/extarray.c:1:
/usr/include/features.h:160:1: warning: this is the location of the previous definition
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.6/corepy/lib/extarray/extarray.o -o /home/gur/COREPY/corepy/lib/extarray/extarray.so
building 'corepy.arch.x86.platform.linux._x86_exec' extension
swigging corepy/arch/x86/platform/linux/x86_exec.i to corepy/arch/x86/platform/linux/x86_exec_wrap.c
swig -python -O -Wall -o corepy/arch/x86/platform/linux/x86_exec_wrap.c corepy/arch/x86/platform/linux/x86_exec.i
unable to execute swig: No such file or directory
error: command 'swig' failed with exit status 1
Как решить проблему?
Система: Ubuntu 10.04
GCC: version 4.4.3
Python: 2.6
CorePy:CorePy 1.0 (SC08 Release)
Отредактировано (Авг. 25, 2010 13:52:48)
Офлайн
- Пожаловаться
#2 Авг. 25, 2010 14:47:25
CorePy &Ubuntu
А оказалось вот как: установить пакет SWIG
Офлайн
- Пожаловаться
#3 Ноя. 6, 2010 20:37:36
CorePy &Ubuntu
Ребят трабла( Все вроде компилируется, но вот это:
With the modules compiled, CorePy may be used by adding the source tree to your
PYTHONPATH:
export PYTHONPATH=$COREPY:$PYTHONPATH
Никакого эффекта не дает, $COREPY это путь к исходникам и модулям corepy. Если то ставил сие изобретение, то поясните как подружить Python и Corepy
Офлайн
- Пожаловаться
#4 Ноя. 6, 2010 22:39:20
CorePy &Ubuntu
Надо полагать, это нужно в ~/.profile прописывать.
А что, python setup.py install не помог?
Офлайн
- Пожаловаться
#5 Ноя. 6, 2010 23:20:07
CorePy &Ubuntu
Вся фишка что помог но не с этим. )
Офлайн
- Пожаловаться
#6 Ноя. 7, 2010 17:23:41
CorePy &Ubuntu
как я понял из логов , ругается на то что не знает куда складывать файлы
Офлайн
- Пожаловаться
