在没有 VirtualEnv 的情况下运行 Pinax
有没有办法在没有 virtualenv 的情况下运行 Pinax?
我想在没有 virtualenv 的情况下运行它,因为我想在 mediatemples 网格托管服务上的 django 容器上运行它。他们的容器可以扩展到 1Gb 的专用内存,因此我不必担心我自己的 VPS 或扩展问题。但他们的回应是:
“由于 DjangoContainer 的工作方式,您将无法配置服务器来使用 virtualenv。本质上,DjangoContainer 是一个虚拟化服务器(除了 AccountCenter 工具之外,您无法访问该服务器) ,或“mtd”命令行工具),其特定目的是为您的 Django 应用程序提供服务。它会安装您的 django 容器文件夹,以便它包含您的应用程序代码,但您无法修改它使用的 python 版本或位置。您必须在没有 virtualenv 支持的情况下使用 Pinax,因为以这种方式使用 virtualenv 的一般想法是为您的 Pinax 应用程序创建一个自定义环境,正如我在这里提到的那样,不可能指示服务器使用它。
Is there a way to run Pinax without virtualenv?
I want to run it without virtualenv as I want to run it on a django-container on mediatemples grid-hosting service. Their containers can scale upto 1Gb of dedicated memory, so I wouldnt have to worry about my own VPS or scaling issues. But their response was:
" because of the way the DjangoContainer works, you won't be able to configure your server to use your virtualenv. Essentially the DjangoContainer is a virtualized server (to which you don't have access other than the AccountCenter tools, or the 'mtd' command line tool) with the specific purpose of serving your Django applications. It mounts your django container folder so that it has your application code, but you cannot modify the version or location of python it uses. This probably means you'll have to use Pinax without virtualenv support, as the general idea of using virtualenv in this way would be to create a custom environment for your Pinax application, which as I mentioned here is impossible to instruct the server to use. "
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从 0.9a1 开始,Pinax 可以在没有 pinax-boot.py 的情况下使用,pinax-boot.py 是 virtualenv 依赖项(我们捆绑了它)。要求是项目级别的,必须使用 pip 安装。但是,
setup_project
在安装需求时确实会强制执行虚拟环境(为了方便起见,它会调用 pip;我愿意在这里不强制执行虚拟环境)。您可以将--no-reqs
传递给setup_project
强制其跳过依赖项安装。然后您可以自己运行 pip 并按照您喜欢的方式安装它。As of 0.9a1, Pinax can be used without pinax-boot.py which was the virtualenv dependency (we bundled it). Requirements are project-level and must be installed with pip. However,
setup_project
does enforce a virtual environment when installing requirements (it calls pip for you as a convenience; I would be open to not enforcing a virtual environment here). You can pass--no-reqs
tosetup_project
forcing it to skip dependency installation. You can then run pip yourself and install it however you like.从技术上讲是可以的,但是您必须更改大量分发的配置并手动安装大量库。 Pinax 将 virtualenv 作为一个非常低级别的内置假设。
technically yes, but you would have to change out quite a bit of the configuration that is handed out and hand install a lot of libraries. Pinax has virtualenv as a very low level built in assumption.
可以,您所需要做的就是找出 virtualenv 中的内容。设置它并在虚拟环境中安装 yolk,然后输入 yolk -l 以查看需要安装什么才能使其正常工作。
you can, all you need to do is find out what is in the virtualenv. set it up and install yolk in the virtual env and type yolk -l to see what you need to install to get it to work.