I have a python script that I run using spyder. It execute other scripts with os.system("...").
My problem is that the cmd windows are not poping (the code is executed, but I can't monitor it, eg see print() or errors).
it was working before I updated spyder recently.
I tried unchecking the "Hide command line output windows generated by the subprocess module" in Tools > Preferences > IPython console > Advanced settings > Windows adjustments
but nothing changed. How can I changed that?
Thanks
Related
visual studio code is not launching in linux even though it is in the path
I tried "code ." and expect to open the vscode for the current folder
export DISPLAY=:0 made my day
My Display was not set.It was unset while doing other debugging. reverting it make the window app launch from terminal.
DISPLAY is part of your linux serverx, usually the linux terminal doesn't support launching the window applications from terminal until the display is configured. so it is essential to make sure you have the right config for your DISPLAY arg for your serverx
I have problems running python files in VS code, like run button is not working sometimes and also it's showing 2 options to run file. as shown in the screenshot. Python 3.x on VS code on WIN 10 Machine
Issue
Currently I'm unable to debug python3 scripts in VSCode. Normally, after clicking "Start debugging" with the python3 interpreter set the VSCode terminal pops up and initiates the script. Now, nothing pops up, but when I look at the "Output" section I do see output assuming from the python extension after I click "Start debugging".
If I switch the interpreter to python 2.7 it works, but 3.7 does not. I reinstalled the python vscode extension and confirmed that the path to the python3 bin file is correct.
Output
> /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/ptvsd_folder_name.py
> /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/ptvsd_folder_name.py
> /usr/bin/env python3 -c "import sys;print(sys.executable)"
> /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -c "import sys;print(sys.executable)"
Specifications
VSCode Python Extension
Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.10.41019
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
VSCode
Version 1.36.1 (1.36.1)
OS
macOS 10.14.6 (18G4032)
I couldn't determine the cause. So I ended up deleting VSCode as well as removing all traces of python3. Finally, I reinstalled both as well as pylint and the python VSCode extension. This resolved the debugger issue.
I am trying to work with Jupyter notebook on Windows 10 (64-bit). I downloaded Anaconda3 5.0.1. Now I should be able to open the jupyter notebook from the command prompt by typing jupyter notebook. However I get the following error:
The only way I am able to open jupyter notebook is from the Anaconda navigator. However, I would like to change the directory from which the notebook opens and none of the solutions here How to change the Jupyter start-up folder work if I cannot open jupyther from the command prompt. I have already tried uninstalling and reinstalling anaconda, but that did not change anything.
This error is because you didn't set environment after installing Anaconda.
Go through following steps to solve this issue
Search in start "Edit the system environment variable" and open it.
Click environment variables button
Go to there and add 2 directory path where you installed Anaconda
i.e. 1. C:\ProgramData\Anaconda3
2. C:\ProgramData\Anaconda3\Scripts
Hope this will solve your error :)
If you have:
Jupiter installed directly from Python (not anaconda)
PATH already configured (in case of not, you can do it manually from Windows system advanced menu)
try with: py -m jupyter notebook
It should work ;)
I have two Windows 7 machines. On one machine I can run python scripts by double clicking on the .py file, however on the other machine the script does not execute, the command prompt will flash quickly and the script does not execute. I can execute scripts on both machines using the command line. I have the same version of python installed on both machines.
How do I ensure that a python script can be executed by double clicking the script on Windows 7?
Step 1. Check if your .py files are associated with "python launcher" (Not just "python"). You can check that by right clicking the .py file and see:
In my case, I have two machines of Windows 10. The one with Python 3.6 installed by choosing "Install Now" works perfectly. The another one which having the same version of python installed in a customized location has problems. It seems nothing to do with the environment path setting, as I could run python in the console mode correctly. So at the end, I was forced to uninstall the python, (then removing all the related paths manually if needed), and install it again with default setting "Install Now".