简体   繁体   English

是我还是Rails和Django很难在Windows上安装?

[英]Is it Me or Are Rails and Django Difficult to Install on Windows?

I tried getting these frameworks working on Windows Vista for a couple of days but to no avail. 我尝试让这些框架在Windows Vista上工作几天,但无济于事。

Every single time I thought I had them working I would get some random error involving the PostgreSQL or MySQL setup, or the paths were screwed up or some other command line error "not recognized as an internal or external command" (or something). 每次我以为我让它们工作我会得到一些涉及PostgreSQL或MySQL设置的随机错误,或者路径被搞砸或者其他命令行错误“未被识别为内部或外部命令”(或其他东西)。 Someone told me that these frameworks are a lot easier to get running on Ubuntu but I really don't want to make that switch as everything I have is on Windows. 有人告诉我,这些框架在Ubuntu上运行起来要容易得多,但我真的不想做那个切换,因为我拥有的只是在Windows上。 Are these common problems when trying to get running on Windows? 尝试在Windows上运行时是否存在这些常见问题?

I think I'll just stick with C# and .NET as everything seems to work pretty nicely together with none of this "install-twenty-different-components" stuff and see if they work together. 我想我会坚持使用C#和.NET,因为一切似乎都很好地与这些“安装 - 二十个不同组件”的东西一起工作,看看它们是否一起工作。 Is Instant Django advisable to use? Instant Django是否可以使用?

I have installed Django on multiple Windows systems (both XP and Vista) with absolutely no issues. 我已经在多个Windows系统(包括XP和Vista)上安装了Django,绝对没有问题。 After installing Python, it is as easy as typing this in a command line, in the folder to which you extracted Django: 安装Python之后,就像在命令行中输入一样简单,在你解压缩Django的文件夹中:

python setup.py install

If you're on Vista, perhaps you can try running your command window "as administrator" to see if that gives you any better luck. 如果您使用的是Vista,也许您可​​以尝试“以管理员身份”运行命令窗口,看看是否能给您带来更好的运气。

Yes. 是。 RoR and Django were difficult to install on Vista. RoR和Django很难在Vista上安装。

I apologize for not having specifics, but here's a general recount of my problem and how I overcame it. 我为没有具体细节而道歉,但这里是对我的问题以及我如何克服它的一般性重述。 Maybe there is something here for you. 也许这里有适合你的东西。

For Python: Your Vista install may have a pre-existing path variable for Python that interferes. 对于Python:您的Vista安装可能有一个预先存在的Python干扰路径变量。 For example, on my HP computer, HP has Python from the factory. 例如,在我的HP计算机上,HP从工厂开始使用Python。 The HP Python path pointed to the HP Python, not the latest that I download for Django. HP Python路径指向HP Python,而不是我为Django下载的最新版本。 Check Control Panel-->System-->Advanced System Settings-->Advanced Tab-->Environment Variables-->System Variables, then check what the "PATH" is. 检查控制面板 - >系统 - >高级系统设置 - >高级选项卡 - >环境变量 - >系统变量,然后检查“路径”是什么。 I changed that path to my fresh install of Python, and then everything worked. 我改变了我的全新Python安装路径,然后一切正常。

For RoR: Are you using the one click installer? 对于RoR:您使用的是单击安装程序吗? I forgot the specifics, but I know right-clicking the 1-Click Installer file and "Run as Administrator" was one of the tricks. 我忘记了具体细节,但我知道右键单击1-Click安装程序文件,“以管理员身份运行”是其中一个技巧。

For RoR and Django: Consider NOT using MySQL and Postgres, at this time. 对于RoR和Django:此时考虑不使用MySQL和Postgres。 Using the default SQLite that comes with the Ruby/Python installers should keep you happy at this stage of the game. 使用Ruby / Python安装程序附带的默认SQLite应该让您在游戏的这个阶段感到高兴。 SQLite is good enough for tinkering and doesn't use as many resources as a full stack database. SQLite足以进行修补,并且不会像完整堆栈数据库那样使用尽可能多的资源。

Good luck! 祝好运!

Django didn't work on my Vista, and that's because Vista screws up command line arguments. Django没有在我的Vista上工作,那是因为Vista搞砸了命令行参数。 See the bottom of this page for solution. 见底部这个页面的解决方案。

In my experience, Ubuntu and other Debian-based OSes are much more trouble-free developer environments for almost everything except C# and .NET stuff. 根据我的经验,Ubuntu和其他基于Debian的操作系统对于除C#和.NET之外的几乎所有东西都是更加无故障的开发人员环境。 That said, C# and .NET obviously are quite excellent on Windows. 也就是说,C#和.NET在Windows上显然非常出色。

I use Instant Rails made to tackle the complaints of the difficult installation process on Windows. 我使用Instant Rails来解决Windows上困难安装过程的抱怨。 It contains Ruby, Rails, MySQL, PHP and phpMyAdmin. 它包含Ruby,Rails,MySQL,PHP和phpMyAdmin。 Downloading and extracting the file to a folder and running a script should do the work. 将文件下载并解压缩到文件夹并运行脚本应该可以完成工作。

django and python didn't work for me using the windows vista command line until I opened the windows registry and set: 在我打开windows注册表并设置之前,django和python不能使用windows vista命令行为我工作:

Computer\\HKEY_CLASSES_ROOT\\py_auto_file\\shell\\open\\command(Default) 电脑\\ HKEY_CLASSES_ROOT \\ py_auto_file \\壳\\开放\\命令(默认)

to

"C:\\Python26\\python.exe" "%1" %* “C:\\ Python26 \\ python.exe”“%1”%*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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