目前尚未安装程序scss

时间:2016-07-19 16:01:35

标签: python css installation sass

我一直在尝试从here安装scss。在成功运行pip install scss之后,我尝试按如下方式运行scss:

scss -i

但是,我接到了错误

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

这很令人困惑,因为pip说scss已正确安装,并且它告诉我安装scss的命令不是安装scss的实际方法。我该如何安装scss?

编辑:这是一个ubuntu平台,从命令行执行import scss会导致错误ImportError: No module named scss

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

在Ubuntu上,如果我执行以下操作,scss的python版本似乎工作正常(请注意,我没有使用此模块的经验)。

$ 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)$

我已经在我的机器上编辑了上面的路径,因为这些路径不相关。

据我所知,应该不依赖于rubss版本的scss。唯一的要求如python-scss文档中所述:

> python >= 2.5
> pyparsing >= 1.5.5

正如我在评论中提到的,您pip install scss可能由于某种原因失败了。您可能希望按照此处的建议捕获log