PyDev: execute line in interactive console (f2) does not work - pydev

After updating to pydev version 6.3.3 (by reinstalling LiClipse) the
F2 shortcut does not work properly. Althought I can start the interactive console with the shortcut, it is not possible to send the lines to the console by F2. Ctrl+Alt+Enter works, but F2 does not.
Restarting Liclipse like proposed here does not work...PyDev doesn't execute shortcut to send current line to console

At the end the only way to fix the problem was downgrading to PyDev 6.2 (by copying manually to the eclipse/dropins folder). This made it necessary to downgrade matplotlib to 2.1.2 and ipython to 5.4.1 (python 2.7)....

Related

VS Code Powershell "←]633;P;IsWindows=True"

I am working on a web application using Angular in Vs code.
I ran into some errors while I am fixing them in the process my vscode is bricked after a couple of minutes it return to its normal state but some weird beep sounds raised so i restarted my Laptop.
When I opened VS code again beep sound repeated and my powershell is showing some weird text
So, I thought the error this is due to some misconfigurations in my vscode and I uninstalled VScode ,deleted all related data
After installation the same weird text with beep sounds appeared again
The weird text
←]633;P;IsWindows=True
633;A633;P;Cwd=D:\user\website\quizPS D:\chiru\website\quiz> 633;B
←]633;C```
As #meganrogge said in https://github.com/microsoft/vscode/issues/160419 setting terminal.integrated.shellIntegration.enabled to false fixes this
I had in the settings Terminal > Integrated: Windows Enable Conpty (setting ID terminal.integrated.windowsEnableConpty) disabled. After re-enabling it again (which is the default) the problem went away for me.
Do you have scala sbt installed? it does not work well with ms power shell. On Windows it can be used via git bash for example. Go to your user vs code settings and adjust so following terminal integration will be active
"terminal.integrated.profiles.windows":{"Git Bash":{"path":"C:\\Program Files\\Git\\bin\\bash.exe"}, },
"terminal.integrated.defaultProfile.windows": "Git Bash",
the close your ms power shell tab in vs code terminal panel and add new bash one.
looks like there is a problem with powershell so i reinstalled my powershell it worked
I solved in this way:
Ctrl + Mayus + P
I faced the same issue. I uninstalled VS Code and installed again and the issue was resolved for me

Wrong Python interpreter being used by VS Code

I am on Ubuntu 20.04 and have both Python2 and Python3 installed natively. I have also installed Python through miniforge, a variant of miniconda. In VSCode I have both the MS Python extension and Pylance installed.
I use the miniforge python for my coding. This works perfectly fine in PyCharm.
However in VSCode, when I try to execute the same file I get errors. After investigating it seems that VSCode is picking native Python2 - even though I have the miniforge Python selected. In this picture it can be seen that the status bar at the bottom states Python interpreter selected is Python3. But the output window shows that the python interpreter is Python2.
A more confusing thing is when I use VSCode for Jupyter notebook files then it picks up the interpreter correctly and I have no issues.
I have checked both User and Workspace settings, and they all point to Python3. How can I fix this for standard .py files?
I prefer VSCode to PyCharm, but will need to use PyCharm till this is resolved.
It seems that your system console cannot see python3. You need to put the python3 in the PATH variable, before python2. Like:
PATH=path/to/python3:path/to/python2:$PATH
Also, make sure that the environment containing python3 is activated before command prompt appears. It can be done in bash_profile by adding a line like
conda activate my_env_with_python3
Try changing the settings "Python:Python path", "Python:default interpreter path" and "Python:conda path" also.
I have just bumped into something similar. The Run code option resulted in the file being run with the default interpreter instead of the venv-based one with necessary packages installed.
The fix was simply to use "Run python file" instead:
The run-code behavior must be customizable, something is mentioned e.g. here: Run Code vs Run Python File in Terminal for VSCODE but I didn't bother.

VSCode on Linux Mint, integrated terminal not able to type anything

Hi I'm running Linux Mint 19 and I have just installed vscode using the snapd package manager. I've not used vscode on linux before as my usual editor is emacs. However, on a fresh new install of vscode, the integrated terminal does not work, there is just a non blinking cursor in the top left of the screen, but no prompt and no keyboard strokes are registering. This appears to be a common problem as there are a lot of posts about it if googled, but they are all for Windows versions and none of the solutions that I'm able to try do anything. I've tried to open a new terminal window, but the same thing happens I just get two terminal windows that I now cannot use. I've also tried checking the box that says Code-runner: Run In Terminal, but that does nothing either. What can I do to get this to work please, I looks to me like it is just not connected to either a bash or Zsh(which I normally use). Any help on this would be appreciated.
Instead of starting vscode with its default shell script (usually located on /usr/share/code/bin/code), the integrated terminal only works for me when starting it directly from the compiled binary (typically found on /usr/share/code/code, which is the same as the launcher created by the installer:
/usr/share/code/code --no-sandbox --unity-launch %F
While I searched for a solution in the past I've also noticed that lots of folks solved similar problems just by adding --disable-gpu flag, so might be worth checking out as well.

VSCode Powershell integrated terminal hangs when starting

I am using VSCode version 1.12.2 in Windows 10 x64 build 16193. I am trying to debug Powershell in VSCode, but I cannot get the PowerShell Integrated Terminal working. Every time I started the terminal, here's what I see:
And then it hangs in that stage. I can still debug, start, step in, step out..., but I cannot view my variable or run any expression.
My VSCode is using powershell x64 here:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
So this is a known issue with this version of windows 10. Workaround here: https://github.com/PowerShell/vscode-powershell/issues/742
It's possible it's getting stuck on something while loading your profile(s). Try adding this to your settings to skip this:
"powershell.enableProfileLoading": false
I have had a similar problem, it seems. I cannot be sure it is the same, but when I would "load a file with VSCode" (user installer confirmed, system installer unconfirmed), it would hang. The following avenues tested:
Double-clicking on a PS1 file (the association to Code being made)
Starting VsCode empty and then loading the file
Starting VsCode from the command-line with a file-designation parameter
Using the --verbose switch, I got a listing which lead me to believe that VsCode seemed to be checking on updates using NPM (I could be wrong here).
Whatever the underlying problem, I did a lot of prodding and probing, and the cure I found was this.
Delete the directory called C:\Users\YourUserId\.vscode.
This directory is rather large, is not wiped by software removal, and may be corrupted apparently. After deleting it, the problem disappeared.

Eclipse Mars Scrolling in Lubuntu

Just installed Eclipse Mars on Lubuntu 14.
While scrolling up and down in the console or editor - I get a kind of black rectangle covering some text, or the test is kind of twisted visually (lines become non-straight).
Anyone know how to fix this?
Haven't had this in previous versions of Eclipse on the same comp.
Exactly the same thing happened to me installing Eclipse Mars on Lubuntu 14 Toshiba Satellite notebook. I was really looking forward to the day of the Eclipse annual release of Mars and I was disappointed to be so disappointed with 5 minutes on installing.
Anyway, I can confirm that setting environment variable SWT_GTK3=0 by way of export does circumvent the problem. If you open a terminal and type "export SWT_GTK3=0" in the shell, you will also need to start Eclipse via the command line while remaining in the same shell. If you start Eclipse via a desktop launch icon, Eclipse will not see the SWT_GTK3 environment variable and the problem will persist. This is because environment variables in Linux are per-process and an application launched from the desktop is running in a different process to a shell process in a terminal.
So that Eclipse always sees the correct SWT_GTK3 environment variable after starting your machine, best you export SWT_GTK3=0 globally. To do this on Lubuntu, follow these steps:
Open a terminal window
Open the file /etc/profile for editing as sudo (e.g. sudo gedit /etc/profile)
Add the line
export SWT_GTK3=0
at the end of the file.
Save file, quit editor and reboot your machine.
Launch Eclipse Mars and hopefully your scrolling problem is fixed.
This worked for me but, as always, YMMV.
btw. You can check the SWT-GTK3 environment variable was exported after rebooting by opening a terminal window and typing the 'env' command. You should see
SWT_GTK3=0 in the list of environment variables and values that are displayed.
It seems like a new bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469027
It happens also under Kubuntu. Anyway the workaround, at least for me, is to export the following environment variable:
SWT_GTK3=0
I solved my problem in Ubuntu 15.04 with Eclipse Mars by adding the following code in the start of data in the Exec option in eclipse.desktop (/home/.local/share/applications):
Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 /usr/lib/jvm/...
In that way you leave intact your OS preferences and act only on Eclipse starting script.