OS: Windows 7 x64
Python: 2.7.3
Pydev: 2.7.1.2012100913
Eclipse: Version: Juno Service Release 1 Build id: 20121004-1855
I am unable to configure a python interpreter in Pydev. If I try using the auto-configuration or the manual configuration I get the same type of error output:
Unable to gather the needed info from the system.
This usually means that your interpreter is not in the system PATH. No
output was in the standard output when trying to create the
interpreter info. The error output contains:>><<
or
See error log for details. No output was in the standard output when
trying to create the interpreter info. The error output contains:>><<
Python is in my PATH. Here is the output of interpreterInfo.py (stdout and stderr):
<xml>
<version>2.7</version>
<executable>C:\Python27\python.exe</executable>
<lib path="out">D:\eclipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc</lib>
<lib path="ins">C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\logilab_common-0.58.0-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\logilab_astng-0.23.1-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\pip-1.1-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\pylint-0.25.1-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\rope-0.9.3-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\sphinx-1.1.3-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\docutils-0.9.1-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\jinja2-2.6-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\pygments-1.5-py2.7.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\lxml-2.2.8-py2.7-win32.egg</lib>
<lib path="ins">C:\Python27\lib\site-packages\spyder-2.0.10-py2.7.egg</lib>
<lib path="out">C:\Windows\system32\python27.zip</lib>
<lib path="ins">C:\Python27\DLLs</lib>
<lib path="ins">C:\Python27\lib</lib>
<lib path="ins">C:\Python27\lib\plat-win</lib>
<lib path="ins">C:\Python27\lib\lib-tk</lib>
<lib path="ins">C:\Python27</lib>
<lib path="ins">C:\Python27\lib\site-packages</lib>
<lib path="ins">C:\Python27\lib\site-packages\PIL</lib>
<lib path="ins">C:\Python27\lib\site-packages\win32</lib>
<lib path="ins">C:\Python27\lib\site-packages\win32\lib</lib>
<lib path="ins">C:\Python27\lib\site-packages\Pythonwin</lib>
<lib path="ins">C:\Python27\lib\site-packages\wx-2.8-msw-ansi</lib>
<forced_lib>__builtin__</forced_lib>
<forced_lib>__main__</forced_lib>
<forced_lib>_ast</forced_lib>
<forced_lib>_bisect</forced_lib>
<forced_lib>_codecs</forced_lib>
<forced_lib>_codecs_cn</forced_lib>
<forced_lib>_codecs_hk</forced_lib>
<forced_lib>_codecs_iso2022</forced_lib>
<forced_lib>_codecs_jp</forced_lib>
<forced_lib>_codecs_kr</forced_lib>
<forced_lib>_codecs_tw</forced_lib>
<forced_lib>_collections</forced_lib>
<forced_lib>_csv</forced_lib>
<forced_lib>_functools</forced_lib>
<forced_lib>_heapq</forced_lib>
<forced_lib>_hotshot</forced_lib>
<forced_lib>_io</forced_lib>
<forced_lib>_json</forced_lib>
<forced_lib>_locale</forced_lib>
<forced_lib>_lsprof</forced_lib>
<forced_lib>_md5</forced_lib>
<forced_lib>_multibytecodec</forced_lib>
<forced_lib>_random</forced_lib>
<forced_lib>_sha</forced_lib>
<forced_lib>_sha256</forced_lib>
<forced_lib>_sha512</forced_lib>
<forced_lib>_sre</forced_lib>
<forced_lib>_struct</forced_lib>
<forced_lib>_subprocess</forced_lib>
<forced_lib>_symtable</forced_lib>
<forced_lib>_warnings</forced_lib>
<forced_lib>_weakref</forced_lib>
<forced_lib>_winreg</forced_lib>
<forced_lib>array</forced_lib>
<forced_lib>audioop</forced_lib>
<forced_lib>binascii</forced_lib>
<forced_lib>cPickle</forced_lib>
<forced_lib>cStringIO</forced_lib>
<forced_lib>cmath</forced_lib>
<forced_lib>datetime</forced_lib>
<forced_lib>errno</forced_lib>
<forced_lib>exceptions</forced_lib>
<forced_lib>future_builtins</forced_lib>
<forced_lib>gc</forced_lib>
<forced_lib>imageop</forced_lib>
<forced_lib>imp</forced_lib>
<forced_lib>itertools</forced_lib>
<forced_lib>marshal</forced_lib>
<forced_lib>math</forced_lib>
<forced_lib>mmap</forced_lib>
<forced_lib>msvcrt</forced_lib>
<forced_lib>nt</forced_lib>
<forced_lib>operator</forced_lib>
<forced_lib>parser</forced_lib>
<forced_lib>signal</forced_lib>
<forced_lib>strop</forced_lib>
<forced_lib>sys</forced_lib>
<forced_lib>thread</forced_lib>
<forced_lib>time</forced_lib>
<forced_lib>xxsubtype</forced_lib>
<forced_lib>zipimport</forced_lib>
<forced_lib>zlib</forced_lib>
</xml>Traceback (most recent call last):
File "D:\eclipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc\interpreterInfo.py", line 199, in <module>
raise RuntimeError('Ok, this is so that it shows the output (ugly hack for some platforms, so that it releases the output).')
RuntimeError: Ok, this is so that it shows the output (ugly hack for some platforms, so that it releases the output).
Any help would be great, thanks!
I did not expect such a problem: (PyDev worked on 27 64-bit PCs under Indigo; I tested The Same PyDev plus Python under Juno on a 32-bit Pc with success; Then by the first attempt on a 64-bit PC came the error ...
I have not used "autoconfig" at all. I was going the line
"File>New>PyDevProject> ...PrjectName... click_here_to_configure_an_interpreter_not_listed" when it happened."
After short googleing the luck came:-)
http://pydev.org/manual_101_interpreter.html
helped me to solve the problem ,
using just an alternative path to the same thing.
{1. Go to: window > preferences > PyDev > Interpreter - (Python/Jython/IronPython). ...}
I had a similar issue. I could not manually or automatically configure. I worked around the problem by re-installing python 2.7. After re-install auto-configuration worked.
I am running Python 3, so I had to make these
changes to get python.exe as my interpreter.
File:
C:\EasyEclipse-for-LAMP-1.2.2.2\extensions
\pydev-1.3.3\eclipse\plugins \org.python.pydev_1.3.3\PySrc
\interpreterInfo.py
Edit all occurrences of “print …” to “
print(…)
” (the … is whatever is being printed), so wrap it in quotes.
Comment out line 16, since True and False are
considered keywords in Python 3.
Save, and you should be able to successfully
set C:\Python32\python.exe as the interpreter.
I kept the default folders checked.
I encountered this problem on Windows after directly copying my python 2.7 (64bits) directory to a new computer. Neither automatic not manual configuration would work, and I had the same errors as you did.
I came back to the original installation, went to C:\Windows\System32 (you might also check SysWOW64, but I'm not sure Python even uses it) and fetched :
python27.dll
pythoncom27.dll
pythoncomloader27.dll
pywintypes27.dll
I copied them into the new computer's System32 and pydev's autoconfig was able to find my python interpreter from the environment variables.
Please Make sure you have installed proper version [32 or 64 bit] of python corresponding to your system OS version
I have a similar issue. Try to run "python --version" to see that python executes in your system
Install OS compatible python executable in your machine.
During installation remember to check "Add Python 3.8 to PATH. (as shown in this image)
Once Python installed successfully in your machine In Eclipse open in the Window -> Preference -> Pydev -> Interpreter -> Python Interpreters menu. (Assuming you already installed PyDev plugin in Eclipse).
Next select Config first in PATH option. (as shown in this image)
You can now see the Python interpreter info in eclipse. (as shown in this image)
Related
Been trying to use log4c in an eclipse IDE. No matter what I try, I can't seem to resolve the __log4c_category_vlog reference in my link.
I can see __log4c_category_vlog via an objdump of the liblog4c.a file, I've tried modifying some of the code in the category.c/category.h files before I do the make/make install, all to no avail. I've set my linker to point to the proper lib64 folder, added proper include etc in Eclipse.
The sample programs that come with log4c compile/link/run ok, so I must be missing something obvious. Any help/heads up appreciated!
log4c version:1.2.4
Eclipse version:luna
Linux: Opensuse 13.2
gcc version: 4.8.3 20140627
/home/david/build3/include/log4c/category.h:359: undefined reference to __log4c_category_vlog'
makefile:30: recipe for target 'testLog4c' failed
./src/testLog4c.o: In functionlog4c_category_log':
I am in the middle of trying to get specflow UI tests working with TFS build and I am very very close.
I wanted to be able to run the same test on a number of browsers, and so after some research I found this:
http://www.baseclass.ch/blog/Lists/Beitraege/Post.aspx?ID=4&mobile=0
And it works like a dream for local test runs. the next step was to get this to call a selenium grid during a TFS 2010 build.
After getting the nunit community build task into my build template, I am now stuck with an error I can't seem to resolve. The build reports the following error:
Error: The system cannot find the file specified. Stack Trace: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at TfsBuildExtensions.Activities.CodeQuality.NUnit.RunProcess(String fullPath, String workingDirectory, String arguments) in d:\Projects\CodePlex\teambuild2010contrib\CustomActivities\Legacy\VS2010\Source\Activities\CodeQuality\NUnit\NUnit.cs:line 339 at TfsBuildExtensions.Activities.CodeQuality.NUnit.PublishMSTestResults(String resultTrxFile, String collectionUrl, String buildNumber, String teamProject, String platform, String flavor) in d:\Projects\CodePlex\teambuild2010contrib\CustomActivities\Legacy\VS2010\Source\Activities\CodeQuality\NUnit\NUnit.cs:line 394 at TfsBuildExtensions.Activities.CodeQuality.NUnit.PublishTestResultsToTFS(ActivityContext context, String folder) in d:\Projects\CodePlex\teambuild2010contrib\CustomActivities\Legacy\VS2010\Source\Activities\CodeQuality\NUnit\NUnit.cs:line 387 at TfsBuildExtensions.Activities.CodeQuality.NUnit.InternalExecute() in d:\Projects\CodePlex\teambuild2010contrib\CustomActivities\Legacy\VS2010\Source\Activities\CodeQuality\NUnit\NUnit.cs:line 299 at TfsBuildExtensions.Activities.BaseCodeActivity.Execute(CodeActivityContext context) in d:\Projects\CodePlex\teambuild2010contrib\CustomActivities\Legacy\VS2010\Source\Common\BaseCodeActivity.cs:line 67.
however, this seems to be masking a deeper error as to me it simply says that nunit can't load a custom assembly. So I had a look through the binaries folder on the build server for the nunit logs, and sure enough in my test run .xml file I find another error:
System.Configuration.ConfigurationErrorsException : The type 'OpenQA.Selenium.Remote.RemoteWebDriver, Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin' could not be found. It may require assembly qualification, e.g. "MyType, MyAssembly".
at Autofac.Configuration.ConfigurationRegistrar.LoadType(String typeName, Assembly defaultAssembly)
at Autofac.Configuration.ConfigurationRegistrar.RegisterConfiguredComponents(ContainerBuilder builder, SectionHandler configurationSection)
at Autofac.Configuration.ConfigurationRegistrar.RegisterConfigurationSection(ContainerBuilder builder, SectionHandler configurationSection)
at Autofac.Configuration.Core.ConfigurationModule.Load(ContainerBuilder builder)
at Autofac.Module.Configure(IComponentRegistry componentRegistry)
at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules)
at Autofac.ContainerBuilder.Build(ContainerBuildOptions options)
at RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.FeatureSetup() in c:\Builds\1\Testing\RegistrationForm - Nightly - Main\Sources\Testing\RegistrationForm\Main\RegistrationForm.Tests.Acceptance\Features\UserRegistration.feature.cs:line 0
From this I started to look at the path to the custom assembly. This is specified in the app.config file for the project (which is transformed during the build. I also checked to ensure the file is being transformed, and in the binaries directory on the build server it is). the relevant section of the file is this.
<specFlow>
<stepAssemblies>
<stepAssembly assembly="SpecFlow.Assist.Dynamic" />
<stepAssembly assembly="Baseclass.Contrib.SpecFlow.Selenium.NUnit.Bindings" />
</stepAssemblies>
<unitTestProvider name="SeleniumNUnit" />
<plugins>
<add name="Baseclass.Contrib.SpecFlow.Selenium.NUnit" path="..\packages\Baseclass.Contrib.SpecFlow.Selenium.NUnit.1.2.0\tools" />
</plugins>
Which works locally. I figured I just need to change the path in the transformed file. At first I assumed the working directory was the binaries directory so in the transform file I have this:
<specFlow>
<plugins xdt:Transform="Replace">
<add name="Baseclass.Contrib.SpecFlow.Selenium.NUnit" path="." />
</plugins>
The dll is in the same dir (binaries) so I tried ".", "", ".\" - none of these worked. So after thinking a little more and reading the errors more carefully I thought I needed to look in the Sources folder on the build server. The Dll is in the packages folder (nuget package restore), and so the path should be the same as I use locally. this didn't work either. So what about a path relative to the ".feature" file throwing the error? this simply needed an extra "..\" - still no luck.
So i am at a bit of a loss, I feel I have tried all the paths i can think of, but my knowledge of specflow plugins and TFS build is letting me down. can anyone give me any pointers?
But the initial error is basically saying the TFSs nunit support cant find a file when it calls CreateProcess, and as you say it works for local test runs, so is it as simple as NUnit isn't installed on the machine that is running the test for you?
I got there in the end!
So somewhere along the lines of setting this up I endded up with something like this in my app.config:
<component
name="IE"
type="Baseclass.Contrib.SpecFlow.Selenium.NUnit.RemoteWebDriver, Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin"
service="OpenQA.Selenium.Remote.RemoteWebDriver, WebDriver"
instance-scope="per-dependency">
<parameters>
<parameter name="browser" value="InternetExplorer" />
<parameter name="url" value="http://192.168.1.3:4444/wd/hub" />
</parameters>
</component>
The problem (as it says in the error) is that it could not find OpenQA.Selenium.Remote.RemoteWebDriver. I belive I saw this in one of the examples I found on the bassclass page. After changing it to OpenQA.Selenium.IWebDriver everything worked fine, and nUnit was able to run my specFlow tests on my TFS 2010 build server. I did hit another snag in that when the build tried to parse the results, it tried to use MSTest 11 rather than 10 (prob because I was using VS 2012). However, this TFS machine was just a proof of concept and was a windows 2008 32bit edition running on Virtual PC on windows 7. (I could therfor not run 64bit, and so could not install VS2012 on my build server). I resolved this by creating a new environment variable for MStest 11 and pointing it at MSTest 10. The entire process now works perfectly.
I'm using Servlet 3.0 without any web.xml just using Spring WebApplicationInitializer. When I start the Webapplication with Run-Jetty-Run in eclipse, the JARScanning takes about 40 seconds since it tries to find HandlesTypes annotations in all jars.
Thus, I tried to set the WebInfIncludeJarPattern in the jetty-web.xml (I also tried jetty-context.xml) and put it in the webapp/WEB-INF folder as described in http://wiki.eclipse.org/Jetty/Howto/Avoid_slow_deployment. I also set metadata-complete="true". The content of the jetty-web.xml file is:
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>.*/.*foo-api-[^/]\.jar$|./.*bar-[^/]\.jar$|./.*wibble[^/]*\.jar$</Arg>
</Call>
</Configure>
However, the JarScanner still scans all the JAR files. In the debug output I can see, that the jetty-web.xml file is parsed AFTER all the JARScanning is done:
OUTPUT:
2013-08-30 09:09:52.836:DBUG:oejw.WebAppContext:preConfigure o.e.j.w.WebAppContext{/admin2,[file:/C:/....../src/main/webapp/]} with runjettyrun.webapp.RJRWebInfConfiguration#1cdc4a5
......
2013-08-30 09:09:52.979:DBUG:oejw.WebAppContext:preConfigure o.e.j.w.WebAppContext{/admin2,[file:/C:/..../src/main/webapp/]} with org.eclipse.jetty.webapp.WebXmlConfiguration#136f39e
2013-08-30 09:09:53.076:DBUG:oejw.WebDescriptor:file:/C:/......../src/main/webapp/WEB-INF/web.xml: Calculated metadatacomplete = True with version=3.0
2013-08-30 09:09:53.076:DBUG:oejw.WebAppContext:preConfigure o.e.j.w.WebAppContext{/admin2,[file:/C:/....../src/main/webapp/]} with runjettyrun.webapp.RJRMetaInfoConfiguration#164de63
... <LOTS OF JARSCANNING>
2013-08-30 09:10:36.677:DBUG:oejw.JarScanner:Search of file:/C:/......./httpclient-cache-4.1.2.jar
2013-08-30 09:10:36.710:DBUG:oejw.WebAppContext:configure o.e.j.w.WebAppContext{/.................} with org.eclipse.jetty.webapp.JettyWebXmlConfiguration#803365
2013-08-30 09:10:36.711:DBUG:oejw.JettyWebXmlConfiguration:Configuring web-jetty.xml
2013-08-30 09:10:36.715:DBUG:oejw.JettyWebXmlConfiguration:Configure: file:/C:/......./src/main/webapp/WEB-INF/jetty-web.xml
How can I force RJR to pick up the jetty-web.xml earlier and only scan the files specified in there? Or is there any other way in RJR to specify the JARS to be scanned?
I am using following versions: Eclipse: Kepler Release 4.3 Build id: 20130614-0229 RJR: 1.3.3.201301020723 Jetty: 8.1.8.v20121106
WINDOWS: 64 bit
Thank you
Here is a workaround for speeding up Jetty 8 with Servlet 3.x.
Create a file (jetty.xml)
Open the RJR configuration
Click on "Show advanced options"
Additional Jetty.xml:
The file (jetty.xml) must have these lines:
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Get name="handler">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>.*/mwa-web-.*\.jar$</Arg>
</Call>
</Get>
</Configure>
Here, I'm telling Jetty that any file starting with mwa-web-* should be scanned for Servlet 3.x.
Looking through the RJR source code I came across this undocumented flag rjrDisableannotation which speeds up the startup time significantly in all Jetty 8/9/9.3.6 (so far I haven't noticed any unwanted side effects - of course as its name suggests it doesn't scan for annotations anymore).
It can be enabled as a "VM argument" in the "Run/Debug configuration" for a "Jetty Webapp".
e.g.:
-DrjrDisableannotation=true
Here the related source code for reference:
https://github.com/xzer/run-jetty-run/blob/rjr1.3.4/Jetty8Support/plugin-jetty8/bootstrap/runjettyrun/Configs.java#L210-L212
Environment:
Windows 2008 R2 64Bit SDK installed at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1
Framework installed at C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Trying to run Nant to compile some .NET 4 classes and we are getting
the following message.
The SDK for the 'net-4.0' framework is not available or not configured.:
NAnt.Core.BuildException: The SDK for the 'net-4.0'
framework is not available or not configured.
at NAnt.Core.Tasks.ExternalProgramBase.DetermineFilePath()
at NAnt.Core.Tasks.ExternalProgramBase.get_ProgramFileName()
at
NAnt.Core.Tasks.ExternalProgramBase.PrepareProcess(Process process)
at NAnt.Core.Tasks.ExternalProgramBase.StartProcess()
at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask()
at NAnt.Core.Task.Execute()
at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies)
at NAnt.Core.Project.Execute()
at NAnt.Core.Project.Run()
In looking at the NANt.exe.config it would appear that it looks to the
registry to find the applicable path for the SDK.
<project>
<readregistry
property="installRoot"
key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
hive="LocalMachine" />
<locatesdk property="sdkInstallRoot"
minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999"
failonerror="false" />
</project>
The key does not exist in the registry nor does our SDK version match the minwinsdkver="v7.0A"
Anyone run into this issue and found a valid work-around?
Simplest solution is to add the key to the registry.
For myself the registry entry was slightly different: at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework set sdkInstallRootv2.0=C:\Program Files\Microsoft SDKs\Windows\v7.0A.
After this Nant compiled fine as expected.
I ran into this issue yesterday. Another workaround is to mark the NAnt executable as 32 bit.
Open a Developer Command Prompt
Change to the directory that contains your NAnt executable.
Run the following command: corflags NAnt.exe /32Bit+
I am having problems running tests with the command line NUnit test runner.
I am using version 2.5.4 with .NET 4 on an x64 machine.
Using the following line results in a failure "Could not load file or assembly 'bar' or one of
its dependencies. The system cannot find the file specified."
nunit-console-x86 foo.dll bar.dll /framework=4.0.30319
If I reverse the dll file names it complains about not finding 'foo' instead...
It works if I run them separately like:
nunit-console-x86 foo.dll /framework=4.0.30319
Also the tests of the second file works if I run:
nunit-console-x86 bar.dll /framework=4.0.30319
Before upgrading our projects to 4.0 we used NUnit 2.5.2 and the same command line tool options and at that point the runner worked well with multiple assemblies. It seems like the ability to run tests on multiple files at the same time is broken...
Anyone that can see the same behavior or does it work indicating that my environment is somehow broken?
/Per
Assembly loading behaviour has changed between 2.5.4 and 2.5.3. It was causing problems for us, so we reverted to 2.5.3, since that still supports the 4.0 framework.
We use nunit-console.exe 2.5.3 with multiple assemblies in our msbuild script, which looks like this:
<Exec Command="%22$(NUnit_Install_Directory)bin\net-2.0\nunit-console.exe%22
/noshadow #(TestableAssemblies, ' ') /xml $(BuildFilesPath)\NUnit-Results.xml" />
On execution, it fills out like this (edited for readability):
"c:\Program Files\NUnit 2.5.3\bin\net-2.0\nunit-console.exe" /noshadow D:\BuildAgent\GojiSoft.Application.Test\bin\Release\GojiSoft.Application.Test.dll D:\BuildAgent\GojiSoft.Common.Test\bin\Release\GojiSoft.Common.Test.dll
/xml D:\BuildAgent\work\2f016459feee51ce\Build\NUnit-Results.xml
We don't use a 64bit machine for our unit tests, so YMMV.
I have a blog post about the addtional modification your should make to the nunit-console-x86.exe.config here: Getting .Net 4.0, Team City, MSBuild and Nunit to play nice.
I has the same problem. I got around it by creating an nunit project in the GUI that includes multiple dlls. Then I can run it with nunit-console.