简体   繁体   English

无法在Plone 4.3.1 Windows上安装开发人员工具

[英]Unable to install Developer Tools on Plone 4.3.1 Windows

I'm on Windows 7 SP1 64-bit with a fresh install of Plone 4.3.1 using the installer Plone-4.3.1-win64.exe. 我在Windows 7 SP1 64位上使用安装程序Plone-4.3.1-win64.exe重新安装Plone 4.3.1。

Plone and Zope run great. Plone和Zope运行得很好。 I am also able to install eggs like plone.app.relationfield by appending the package name to buildout.cfg. 我也可以通过将包名附加到buildout.cfg来安装像plone.app.relationfield这样的蛋。 However when I try to install the developer tools using: 但是当我尝试使用以下命令安装开发人员工具时:

bin\buildout -c develop.cfg

I get the following output: 我得到以下输出:

Unused options for buildout: 'buildout-user' 'need-sudo'.
Updating _mr.developer.
Updating instance.
Updating repozo.
Updating backup.
Updating zopepy.
Updating precompiler.
Compiling Python files.
SyntaxError: ('invalid syntax', ('c:\\plone43\\eggs\\restrictedpython-3.6.0-py2.
6.egg\\RestrictedPython\\tests\\before_and_after27.py', 30, 17, '    x = {y: y f
or y in whatever if y}\n'))

SyntaxError: ('invalid syntax', ('c:\\plone43\\eggs\\restrictedpython-3.6.0-py2.
6.egg\\RestrictedPython\\tests\\security_in_syntax27.py', 6, 13, '    {y: y for
_restricted_name in x}\n'))

Compiling locale files.
Error while compiling c:\plone43\eggs\python_gettext-1.2-py2.6.egg\pythongettext
\tests\test5.po
Error while compiling c:\plone43\eggs\python_gettext-1.2-py2.6.egg\pythongettext
\tests\test_escape.po
Updating run-instance.
Updating service.
Updating test.
Updating diazotools.
Installing zopeskel.
Getting distribution for 'zopeskel.diazotheme==1.1'.
warning: no previously-included files matching '*' found under directory 'docs\_
build\_sources'
error: Setup script exited with error: Setup script exited with error: Setup scr
ipt exited with error: SandboxViolation: open('build\\lib\\paste\\evalexception\
\media\\MochiKit.packed.js', 'wb') {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
An error occurred when trying to install zopeskel.diazotheme 1.1. Look above thi
s message for any errors that were output by easy_install.
While:
  Installing zopeskel.
  Getting distribution for 'zopeskel.diazotheme==1.1'.
Error: Couldn't install: zopeskel.diazotheme 1.1
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

I am mainly trying to install zopeskel and the zopeskel.dexterity templates which also fail the same way if I comment out zopeskel.diazotheme. 我主要是尝试安装zopeskel和zopeskel.dexterity模板,如果我注释掉zopeskel.diazotheme,它们也会以同样的方式失败。 In fact, I can get everything to install except zopeskel.diazotheme and zopeskel.dexterity if I comment them out. 事实上,如果我发表评论,除了zopeskel.diazotheme和zopeskel.dexterity,我可以安装所有内容。 The above RestrictedPython syntax errors remain but don't seem to affect anything. 上面的RestrictedPython语法错误仍然存​​在但似乎没有任何影响。

This is all out-of-the-box configuration stuff. 这是所有开箱即用的配置。 I've been searching and trying everything I can think of including reinstallation. 我一直在寻找和尝试我能想到的一切,包括重新安装。 I've worked with Plone of and on for years but I'm out of ideas on this one. 我和Plone一起工作了很多年,但是我对这个想法一无所知。

Any help is appreciated. 任何帮助表示赞赏。

I finally solved this issue but I still don't know what the exact problem is. 我终于解决了这个问题,但我仍然不知道确切的问题是什么。 It has something to do with easy_install and directory access - possibly to temp directories and possibly because of some kind of race condition that happens during the buildout process. 它与easy_install和目录访问有关 - 可能是临时目录,也可能是因为在构建过程中发生了某种竞争条件。

The summary of the solution is to install everything in the stock develop.cfg file EXCEPT for zopeskel.diazotheme and zopeskel.dexterity . 该解决方案的总结是安装在股票develop.cfg文件的一切,除了zopeskel.diazothemezopeskel.dexterity。 There is also a bug with the distribution of DocFinderTab buildout tries to download. DocFinderTab buildout尝试下载时也存在一个错误。 it's an empty zip file. 这是一个空的zip文件。

This approach was followed on both the Windows 7 64-bit configuration mentioned in the question as well as a Windows XP SP3 32-bit machine. 在问题中提到的Windows 7 64位配置以及Windows XP SP3 32位计算机上都遵循了这种方法。 In both cases, the Plone 4.3.1 windows installer was used as per the latest Plone website recommendation of May 20, 2014. There is no windows installer for the latest Plone 4.3.3 so the path is to use the 4.3.1 isntaller and upgrade Plone after installing. 在这两种情况下,根据2014年5月20日最新的Plone网站推荐使用Plone 4.3.1 Windows安装程序。最新的Plone 4.3.3没有Windows安装程序,所以路径是使用4.3.1 isntaller和安装后升级Plone。 I did not upgrade before installing these packages. 在安装这些软件包之前我没有升级。 Both Linux and/or OSX have my permission to eradicate Windows from the planet yet it persists. Linux和/或OSX都允许我从地球上消除Windows,但它仍然存在。

Here's the steps: 这是步骤:

  1. Open the Windows Service Manager and stop the Plone 4.3.1 service. 打开Windows服务管理器并停止Plone 4.3.1服务。
  2. Set the Plone 4.3.1 service to manual start so there's no funny business at any point. 将Plone 4.3.1服务设置为手动启动,因此任何时候都没有有趣的业务。
  3. Open C:\\Plone43\\buildout.cfg in a text editor that can handle unix line endings. 在文本编辑器中打开C:\\ Plone43 \\ buildout.cfg ,可以处理unix行结尾。
  4. Find the eggs variable around line 80 and add plone.app.relationfield to the list: 在第80行找到egg变量,并将plone.app.relationfield添加到列表中:

    eggs = Plone Pillow Products.PloneHotfix20130618 plone.app.relationfield eggs = Plone Pillow Products.PloneHotfix20130618 plone.app.relationfield

  5. Save buildout.cfg 保存buildout.cfg

  6. From a command prompt in c:\\Plone43 run: c:\\Plone43的命令提示符运行:

    bin\\buildout -n bin \\ buildout -n

  7. Ignore any errors and warnings. 忽略任何错误和警告。
  8. From PyPI, download the DocFinderTab 1.0.5 zip package to C:\\Plone43\\downloads\\dist 从PyPI,将DocFinderTab 1.0.5 zip包下载到C:\\ Plone43 \\ downloads \\ dist
  9. In a text editor (not Notepad), open C:\\Plone43\\develop.cfg 在文本编辑器(而不是记事本)中,打开C:\\ Plone43 \\ develop.cfg
  10. Locate the [zopeskel] part around line 144. 找到144行周围的[zopeskel]部分。
  11. Comment out zopeskel.diazotheme and zopeskel.dexterity : 评论zopeskel.diazothemezopeskel.dexterity
[zopeskel]
# installs paster and Zopeskel
recipe = zc.recipe.egg
eggs =
    ZopeSkel
    Paste
    PasteDeploy
    PasteScript
#    zopeskel.diazotheme
#    zopeskel.dexterity
    zest.releaser
    ${buildout:eggs}
  1. Save develop.cfg 保存develop.cfg
  2. From a command prompt in C:\\Plone43, run: 从C:\\ Plone43中的命令提示符处运行:

    bin\\buildout -c develop.cfg bin \\ buildout -c develop.cfg

  3. Ignore the numerous errors and warnings - there will be blood. 忽略许多错误和警告 - 会有血。
  4. From PyPI, download the zopeskel.dexterity 1.5.4.1 zip file 从PyPI下载zopeskel.dexterity 1.5.4.1 zip文件
  5. Open buildout.cfg in a text editor 在文本编辑器中打开buildout.cfg
  6. Find the [version] part around line 203 找到第203行附近的[版本]部分
  7. Change the version on zopeskel.dexterity from 1.5.2 to 1.5.4.1 zopeskel.dexterity上的版本从1.5.2更改为1.5.4.1
  8. Save buildout.cfg 保存buildout.cfg
  9. Unzip the zopeskel.dexterity package so all the files are located in C:\\Plone43\\downloads\\dist\\zopeskel.dexterity-1.5.4.1 . 解压缩zopeskel.dexterity包,使所有文件都位于C:\\ Plone43 \\ downloads \\ dist \\ zopeskel.dexterity-1.5.4.1中
  10. Make sure you zip tool doesn't also create a sub-directory called zopeskel.dexterity-1.5.4.1. 确保你的zip工具不会创建一个名为zopeskel.dexterity-1.5.4.1的子目录。 If so, cut and paste that directory up one level and overwrite the other one. 如果是这样,将该目录剪切并粘贴到一个级别并覆盖另一个级别。
  11. From PyPI, download the zopeskel.diazotheme 1.1 zip package to the dist directory. 从PyPI,将zopeskel.diazotheme 1.1 zip包下载到dist目录。
  12. Unzip zopeskel.diazotheme the same way you did zopeskel.dexterity. 解压缩zopeskel.diazotheme的方法与zopeskel.dexterity相同。
  13. In a command prompt in c:\\Plone43, run the following command: 在c:\\ Plone43的命令提示符中,运行以下命令:

    bin\\buildout -v setup "C:\\Plone43\\downloads\\dist\\zopeskel.dexterity-1.5.4.1\\setup.py" install bin \\ buildout -v setup“C:\\ Plone43 \\ downloads \\ dist \\ zopeskel.dexterity-1.5.4.1 \\ setup.py”install

  14. Next run: 下次运行:

    bin\\buildout -v setup "C:\\Plone43\\downloads\\dist\\zopeskel.diazotheme-1.1\\setup.py" install bin \\ buildout -v setup“C:\\ Plone43 \\ downloads \\ dist \\ zopeskel.diazotheme-1.1 \\ setup.py”安装

  15. In the Windows Service Manager, reset the Plone 4.3.1 service to Automatic and start it. 在Windows服务管理器中,将Plone 4.3.1服务重置为自动并启动它。

Everything should work now. 现在一切都应该有效。

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

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