首页 \ 问答 \ 在linux上安装virtualenv(Installing virtualenv on linux)

在linux上安装virtualenv(Installing virtualenv on linux)

我正在使用linux mint 14,并通过apt-get安装了virtualenv:

$ sudo apt-get install python-virtualenv
$ virtualenv --version
> 1.7.1.2

问题是它是旧版本。 当我通过PIP安装它时,它会安装我想要的版本,但它只能通过root用户访问:

$ pip install virtualenv --upgrade (fails)
> ...OSError: [Errno 13] Permission denied: '/usr/bin/virtualenv'
$ sudo pip install virtualenv
$ virtualenv --version
> bash: /usr/bin/virtualenv: No such file or directory
$ sudo virtualenv --version
> 1.8.4

任何提示?


I'm using linux mint 14, and installed virtualenv via apt-get:

$ sudo apt-get install python-virtualenv
$ virtualenv --version
> 1.7.1.2

The problem is that it's an old version. When I install it via PIP, it installs the version I want, but it is only acessible via root user:

$ pip install virtualenv --upgrade (fails)
> ...OSError: [Errno 13] Permission denied: '/usr/bin/virtualenv'
$ sudo pip install virtualenv
$ virtualenv --version
> bash: /usr/bin/virtualenv: No such file or directory
$ sudo virtualenv --version
> 1.8.4

Any hint?


原文:https://stackoverflow.com/questions/13563029
更新时间:2021-12-24 14:12

最满意答案

如果我正确理解你的问题,你会担心填充是“偏离中心”而在右边。 这是因为您的填充定义是:

padding: 4px 9px 9px 0px;

以上就是你现在拥有的。 填充定义为:

padding: top right bottom left

您可以在上面看到,您将右侧设置为9px,但左侧设置为0px。 如果您希望它成比例,请确保右侧和左侧值相等。


If I understand your question correctly, you are concerned that the padding is "off center" and to the right. This is because your padding definition is:

padding: 4px 9px 9px 0px;

Above is what you currently have. Padding is defined as:

padding: top right bottom left

You can see above, you are setting the right side to 9px, but the left side to 0px. If you want this to be proportional, make sure the right and left values are equal.

相关问答

更多
  • 你有没有在HTML文档的顶部(在标签的上方) IE9要求网站显示新的HTML5 / CSS3 编辑:或许多其他Doctype(XHTML等,但这是最简单和最容易记住的) Have you got this at the top of your HTML document (Above the tag) IE9 requires this for the website to display the new HTML ...
  • 我不知道behaviour属性,但也许CSS3饼图库会为你做这项工作: PIE使Internet Explorer 6-9能够呈现几个最有用的CSS3装饰功能。 I don't know the behaviour property, but maybe the CSS3 Pie javascript library would do the job for you: PIE makes Internet Explorer 6-9 capable of rendering several of the mo ...
  • 看看border-radius.htc或CSS3 Pie 。 Border-radius.htc .curved { -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; behavior:url(border-radius.htc); /* important line */ } 馅饼 .curved { -moz-border-radius:10px; -webkit-border-ra ...
  • 你引用.htc文件了吗? *.htc文件应该相对于你的html文档引用, 而不是相对于你的样式表。 如果这不能解决您的问题,您能否向我们提供代码示例或您将网站部署到的网址? Did you reference your .htc file correct? *.htc files should be referenced relative to your html document, not relative to your stylesheet. If this won't resolve your is ...
  • 这里的工作示例http://jsfiddle.net/uorto4ny/3/ 只需将背景大小更改为此即可 -webkit-background-size: 25%; -moz-background-size: 25%; -ms-background-size: 25%; -o-background-size: 25%; background-size: 25%; Working example here http://jsfiddle.net/uorto4ny/3/ Just change your ba ...
  • 首先,你的代码border-radius有一些拼写错误border-radius而不是border radius然后,如果你为一个高度小于border-radius本身的元素的所有角应用border-radius ,那么浏览器只应用圆角的一半元素的高度。 例如,如果您有一个具有10ox高度的div ,并且如果您为每个角应用5px半径,那么浏览器只会将10px border-radius应用于每个角。 这并不意味着你有5px border-radius这意味着只有5个顶部像素会影响。 在您的示例中, div没 ...
  • Lorem Ipsum
    现场示例
    Lorem Ipsum