Unable to run .robot files in Eclipse Oxygen in Mac - eclipse

I have a Mac laptop and have installed RED in Eclipse Oxygen version. When I try to run a .robot file in Eclipse I see the popup RunTime Environment Error with the message "Unable to provide valid RED environment. Check python/ robot installation and set it in Preferences". I do not see this issue in Windows machine.

This errors tells that RED could not found Python+Robot installation using command which/whereis. This can be verified by going to Windows->Preferences->RobotFramework -> Installed Frameworks. That part should show you list of python interpreters with robot - in your case either could be empty (no python found) or entry with red color (python without robot found).
On Windows usually Python is added to PATH so it is visible and discovered by RED, somehow Mac does not do this by default (you are not the first person with such issue).
Go to Windows->Preferences->RobotFramework -> Installed Frameworks, there is Add.. button and provide path where python executable is located. I do not have MacOS to provide you usual path, under linux (Centos,Ubuntu) it is in /usr/bin . Take note that RED looks for python filename, if your installation renamed it to python3,python2,py2,py3 or other just make a copy to python.
I will make an Help topic about finding python installations when python is not in PATH as it seems it is more common than I fought.
If you have any other questions, it is better to create GitHub issue: https://github.com/nokia/RED/issues

Related

why my vscode does not have the same libraries installed in wsl?

I'm using wsl and it runs codes in vscode pretty fine and I have different libraries which I installed through pip and conda in wsl but when I run that code using vscode itself it doesn't recognize the libraries or even pip itself.
I don't have any other environment.
I should add that I installed the packages globally using conda install ... or pip install ... in base environment and I only have base environment and I run my code through code . and I also have python and remote wsl extensions installed in my vscode.
what can be the problem?
I don't have much personal experience with this, but I found some useful information in this Stack Overflow question (even though it doesn't utilize conda), along with https://code.visualstudio.com/docs/remote/wsl-tutorial#_python-development.
I also found this blog post useful, even if it doesn't cover WSL.
In short, make sure you:
Have installed the Python extension (by Microsoft) in VSCode. This is critical for being able to detect and select the Python interpreter. You don't mention having this in place, so I believe this is your likely problem.
You have done this already, but including it for others who might read this later -- Install the Remote - WSL extension (or the Remote Development extension pack) in VSCode.
You are also doing this already -- Start VSCode from inside your WSL distribution. Alternatively, you can start VSCode from Windows and then select the Remote WSL - Reopen Folder in WSL from the Command Palette (also accessible from the "Remote" Status Bar).
In VSCode, open the Command Palette with Shift+Ctrl+P, search for the Python: Select Interpreter command, and you should find your Conda environment in the list.
After selecting this, you should find that your project is using the interpreter and modules that you have installed via conda.
One thing I did to overcome this issue is go to Extensions -> Local (You should have two tabs there, Local and WSL:DISTRO) DISTRO refers to whatever DISTRO you're using, you will see that some of the local extensions are disabled in the current workspace (WSL) and there is a little cloud icon in the WSL:DISTRO tab that says install Local Extensions in WSL:DISTRO once you click that it will let you choose which extensions to install and you should be good to go!

How to configure VSCode to find a third-party tool (e.g. stack, yamllint) if these tools are installed through anaconda?

Assuming that VSCode is installed and an anaconda environment is setup. The default conda environment contains language analysis and compilation tools like stack (for haskell) and yamllint (for yaml). However, since conda 3.4 they are under <conda_install_dir>/bin, which is not included in system PATH environment variables. The only executable is conda itself.
After installation of VSCode and its plugin, I frequently encounter error messages indicating that executables of these tools are not found. E.g. for stack, the message is:
Project requires Cabal but it isn't installed
It appears that the only way to make it work is to override the PATH variable in VSCode to make it different from the one used by OS. Is there a option to allow this overriding?
Thanks a lot for your help
have you tried updating your PATH to simply include it ?

Eclipse Popping in Unexpected error [duplicate]

I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends getting the 32bit one), the Android SDK, and the Eclipse IDE for Java Developers (x86).
However, my Eclipse won't launch when I double click eclipse.exe! Instead, I get the following error message:
I tried adding Java to my Path variable in my Environment variables as suggested in some of the solutions I looked up, but it still doesn't launch properly.
Anyone know what else I can try? Also, if possible, please do not use super-technical vocabulary as I'm new to these kinds of stuff and will not understand you...thank you haha :D
I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.
It didn't help much.
The problem was resolved when I changed PATH variable by removing
C:\ProgramData\Oracle\Java\javapath;
In command prompt I also ran following commands:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH%
But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.
I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.
If it didn't work, You may also add a new path to the java bin folder which worked for me.
Here is an alternative:
As described here, make sure that you have the -vm option set in your eclipse.ini file.
It must be an absolute path and on 2 separate lines:
-vm
<Absolute Path>\javaw.exe
Save your .ini and relaunch Eclipse
One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.
Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.
Solution: Go to Control Panel -> Uninstall Programs
If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit
It works like magic!
What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:
choco install adoptopenjdk11

How can I make Pygame work with Pydev?

I'm working off the latest Mac OS trying to set up my programming environment. Right now what I want to do is to get Pygame working with Pydev so I can do my Python programming from Eclipse. What I've done so far is installed Python 2.6 from python.org and then installed pygame 1.9 from the site.
What happens is that when I try running Python from the command line, I am able to import pygame without a hitch, but when I try to do the same thing from Eclipse, it doesn't work.
I think it might be because Pydev doesn't know where to find Python, in which case I would like some help on how to make sure it's pointing to the right one.
Thanks!
I work with Eclipse on Windows, but I believe that the Mac version eclipse should be the same.
In Eclipse,
click Windows > Preferences,
expand PyDev from left side,
find Interpreter - Python,
switch to Libraries tab,
click New Folder on the right hand,
navigate to your pygame path, and
click Apply and OK.
Turn to your Python project in eclipse,
right click on it,
choose PyDev - Interpreter/Grammar,
choose Python as Project type,
choose 3.0 or your correspond Python version from Grammar,
at last make sure the Interpreter you are using is the same as the one you just configured.
Build your project from eclipse, and it should work.
In Eclipse, Window->Preferences, expand Pydev and choose Interpreter - Python. Then specify your python path. Try first by clicking "Auto Config" to auto-locate your python installation. Then click Apply and Ok.
Make sure this much works by creating a new Python project (without worrying about Pygame yet).
I tested these instructions from Eclipse Helios on Windows. Hope it works for you.
http://www.vogella.de/articles/Python/article.html
If autoconfig is not finding 2.6 you can add it manually at Preferences/PyDev/Interpreter - Python. There you have to press New and set the path for your Python executable.
For Python2.6 the path is: /System/Library/Frameworks/Python.framework/Versions/2.6/bin/Python2.6
For Python2.7 (and higher), the path is different:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Those paths work on OS X 10.6.8, might change for other versions.
Do what the people says, and if that does not work, make sure that you have downloaded the development package.
On menu Window > Preferences > PyDev > Interpreters > Python Interpreters
If your python interpreter config have a pygame and don't work, try to put on force bultins the new keyword "pygame"
Python part
Install Python 3.5.2 32 bits (From python.org)
Download the right pyGame library for 3.5.x 32 bits (It will be pygame-1.9.2b1-cp35-cp35m-win32.whl)
Open the system console and go to the folder where the library was download.
Write in the console: pip install pygame-1.9.2b1-cp35-cp35m-win32.whl
This should install the pygame library.
Note: If the pip version is not the last one, upgrade it. (In this step you should know how, just pay attention.)
Eclipse Part
Open Eclipse
Go to Help>Install new software.
Look for the botton "Add" in the right top corner.
In Location put http://pydev.org/updates. Put a cute name, too. Then click OK.
Check pyDev checkbox. Go next, Finish. Accept licenses. In simple words: Install it.
Go to Window>Preferences>pyDev>Interpreters>Phyton interpreter.
In the Python interpreters part, click Quick Auto-Config.
Note: If you want to do this manually, you should know the path where you installed Python and search for python.exe
Some libraries should manifest in the libraries tab. Click apply.
In the libraries tab, click New Folder.
Search for PyGame installation path (In my case, C:\Python\Python35-32\include\pygame but it's always on Python installation path plus include\pygame, ok?)
Click Accept.
Go to Forced Builtins tab. Click New... and add 'pygame'.
Apply again ! (You should know that I do this only for safety. You can apply just one time.
Click OK.
Test
File> New> Proyect...> PyDev> PyDev Proyect.
Click Next
Complete the Proyect Name. On Grammar Version combobox, select 3.0 - 3.5 and in interpreter choose python.
Note: "Quick Auto-Config" named "python" to the interpreter. If you did this part manually, you should know the exact name because you named it.
Try simple code
import pygame
print(pygame.ver) # This should print the pygame version.
pygame.init() # This does nothing by now, just checking code.
I wasted forever trying to get this to work as well..
I eventually found these steps (you don't need them all just part of my struggles shared).
in Python Shell:
import sys
print (sys.path)
Noticed NO PYGAME in path.
Eventually I GAVE UP on the .exe binaries and was told to use .WHL files and Python PIP to install. but was told NOT VALID wheel file. (frustrating).
what EVENTUALLY WORKED was to (in windows, but similar should work in other OS's).
run Command Prompt as Administrator (just to be sure) Maybe same in other OS's. you'd have to try.
from C:> i Changed Dir to my Python.exe (or the python program itself).
from my python directory in command prompt I typed the following (Like I would a Linux apt-get install command):
**
python.exe -m pip install pygame
**
Shortly after, there were hash marks ##### indicating a download was taking place (Linux type progress bar in shell).
in ECLIPSE without ever changing the Libraries folder to include PyGame folders I was able to run a sample Python PYGAME Script sample (I got a white screen but haven't gone further yet). I was just HAPPY to not have to see the trace back error message :)
now I am finished typing this to you I will be going to test it out further.
Just thought this would help someone :0)
I met such problem in Python 3.6 using LiClipse (which should be similar as Eclipse). It's solved by import pygame as
import pygame
from pygame.locals import *
Then add the pygame folder to Window>Preferences>PyDev>Interpreters>PyDev>Libraries, type in 'pygame' in the Forced BuiltIns tab at the same page, also right click the project, change Properties>PyDev-PYTHONPATH>Source from {proj_dir_name}/ to {proj_dir_name}/src
Maybe some above steps are not necessary. Anyway doing all aboves solves the problem in my case.

Can't run eclipse on netbook MSi wind! HELP

I just got this MSI wind netbook and tried to run eclipse on it. I installed JDK6 on the netbook already. Whenever I open eclipse there is nothing show up on the screen except a "warning sound" that alerts. What is the problem here?
ps.I just started learning java.
Most likely the Eclipse starter program can't find where you installed Java. Since Eclipse is a Java program, it needs a JRE installed (comes with the JDK typically) to run. Assuming you're running Windows on your MSI Wind, check to make sure the java executable is on your path in your computer environment settings (windows key + printscreen button, or windows key + pause button are the shortcuts to open the computer properties dialog if I remember correctly. Then go to advanced).
You can test if java is on the path by opening a cmd.exe shell window and typing 'java'. If it says it cannot find java, then you need to fix the path.
See this link for additional troubleshooting details: http://www.eclipsezone.com/eclipse/forums/t99010.html
You could try reinstalling the JDK. Perhaps having it on a different disk than the default (D: versus C:) is causing some trouble? It certainly isn't a problem with the hardware, I'm running Eclipse on Windows on an MSI Wind.
Use "Add/Remove programs" in the control panel to remove the java versions you have installed.
Then visit "java.com" and use it to install Java, and verify that it is working. You do not need more than that to use Eclipse.