简体   繁体   中英

The program scss is not currently installed

I have been trying to install scss from here . After sucessfully running pip install scss , I then tried to run scss as follows:

scss -i

However, I then got the error that

The program 'scss' is currently not installed. You can install it by typing:
sudo apt-get install ruby-sass

This is confusing because pip says that scss was installed correctly, and that the commands it tells me to install scss with is not the actual way to install scss. How can I install scss?

Edit: This is a ubuntu platform and doing import scss from the command line resulted in the error ImportError: No module named scss .

确保从此处安装了原始SCSS / SASS。

On Ubuntu, if I do the following, the python version of scss appears to work fine (mind you, I don't have experience with this module).

$ virtualenv so1
New python executable in so1/bin/python
Installing setuptools, pip...done.
$ cd so1
$ source bin/activate
$ pip install scss
Downloading/unpacking scss
  Downloading scss-0.8.73-py2.py3-none-any.whl
Downloading/unpacking pyparsing (from scss)
  Downloading pyparsing-2.1.5-py2.py3-none-any.whl (42kB): 42kB downloaded
Installing collected packages: scss, pyparsing
Successfully installed scss pyparsing
Cleaning up...
(so1)$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scss
>>> 
(so1)$ which scss
<path>/so1/bin/scss
(so1)so1$ scss -i
SCSS v. 0.8.73 interactive mode
================================
Ctrl+D or quit for exit
>>> 
Bye bye.
(so1)$

I've edited-out the paths above on my machine as those aren't relevant.

There should be no dependency on the ruby version of scss, as far as I can tell. The only requirements are as stated in the python-scss documentation:

> python >= 2.5
> pyparsing >= 1.5.5

As I mentioned in the comments, your pip install scss probably failed for some reason. You'll probably want to capture the log as suggested here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM