-1

I use a Ubuntu 16.04 system, and I want to install the gasp for python. I was told that the following commands can help me to install the python-gasp:

 $ sudo apt-get install python-gasp

I tried the commands, but it seems not to work, because when I run

from gasp import 

it returned as

"No module named gasp".

Then I use $ whereis python-gasp to check the location of the python-gasp I installed, and it returned as /usr/share/python-gasp

I don't know what happened. How can I use gasp successfully?

furas
  • 95,376
  • 7
  • 74
  • 111
LaoSun
  • 3
  • 1
  • did you get error message when you use apt-get ? Do you use Python2 ? Ubuntu16 as default use Python3. `python-gasp` is for Python2, `python3-gasp` can be for Python3 . If `whereis` can find it then maybe it is program which you can run `$ python-gasp` – furas Nov 17 '16 at 04:28
  • Thank you very much. I have changed the default into python2.7 when I finished the Ubuntu16 installing. And I use' $python --version' to confirm this, it says 'Python 2.7.12 :: Anaconda 4.2.0 (64-bit)'. So, I can make sure that the default mode is Python2. – LaoSun Nov 17 '16 at 05:15
  • don't change default Python in Ubuntu because it uses Python for many things - it can crush system. You can have both version installed and use `python2` or `python2.7` and `pip2`, `pip2.7` (and `python3`, `pip3`) – furas Nov 17 '16 at 05:18
  • I checke `gasp` in internet. It is almost 5 years old, there is no version for Python3. – furas Nov 17 '16 at 05:21
  • Thanks a lot for your suggest, I am a novice on Linux and Python. But I love them deeply. I will work hard to learn bash, linux and python. – LaoSun Nov 17 '16 at 07:05

1 Answers1

0

python-gasp is module for Python 2. I don't see python3-gasp for Python 3 (Linux Mint 17 based on Ubuntu 14.04) but maybe you have on Ubuntu 16.

Ubuntu 16 as default use Python 3. Maybe you will have to install Python 2 to use gasp.

Or maybe you already have installed. Try python2 or which python2 to find path.

furas
  • 95,376
  • 7
  • 74
  • 111
  • Thank you very much. I have changed the default into python2.7 when I finished the Ubuntu16 installing. And I use' $python --version' to confirm this, it says 'Python 2.7.12 :: Anaconda 4.2.0 (64-bit)'. So, I can make sure that the default mode is Python2. And I found a error when I was installing GASP, it said:"Sub-process /usr/bin/dpkg returned an error code (1)". – LaoSun Nov 17 '16 at 05:23