spyder

When running PyQt5 app in Spyder it always exits with -1

柔情痞子 提交于 2019-12-17 19:55:33
问题 I am learning to program with PyQt5. No troubles with that, but there is one annoying issue: when I start the app, I immediately get the message that an exception occurred and SystemExit: -1 is repported (see below). An exception has occurred, use %tb to see the full traceback. SystemExit: -1 /home/arnold/bin/anaconda3/envs/ml-gpu/lib/python3.5/site-packages/IPython/core/interactiveshell.py:2918: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D

How to change the path of Python in Spyder?

喜夏-厌秋 提交于 2019-12-17 09:33:20
问题 I'm using Debian. I installed Python 3.2.3. The path of Python 3 is /usr/bin/python3. How do I change it in Spyder? 回答1: Press CTRL+SHIFT+ALT+P to open the Preferences window. Within this window, select the Console item on the left, then the Advanced Settings tab. The path to the Python executable will be right there. 回答2: simple if your not able to change the working directory .Press CTRL+SHIFT+ALT+P to open the Preferences window then go to RUN then see the working directory options and

Python Pandas - Missing required dependencies ['numpy'] 1

泪湿孤枕 提交于 2019-12-17 07:22:55
问题 Since yesterday I've had this error when I try to import packages on anaconda : ImportError: Missing required dependencies ['numpy'] I have tried un-installing Anaconda and Python, switching to Python 2.7 but nothing works it's still the same error, here is the code I get : Any help is really appreciated thanks ! 回答1: I had this same issue immediately after upgrading pandas to 0.19.2. I fixed it with the following install/uninstall sequence from the windows cmd line: pip uninstall pandas -y

How to use argv with Spyder

别等时光非礼了梦想. 提交于 2019-12-17 06:50:55
问题 I'm running the code below in Spyder. I have typed it in a py file and simply hit the run button. When I try to run it I get the error: ValueError: need more than 1 value to unpack As shown here you are meant to give the inputs for the argv variable before running the program but I don't know how to do this is spyder? http://learnpythonthehardway.org/book/ex13.html from sys import argv script, first, second, third = argv print "The script is called:", script print "The first variable is:",

No multiprocessing print outputs (Spyder)

自闭症网瘾萝莉.ら 提交于 2019-12-17 06:50:14
问题 I have recently started to delve into multiprocessing, as I believe my code can be easily parallelized. Upon working through the tutorials, though, I encountered an issue: functions distributed in a pool do not seem to print. Here's the culprit: __spec__ = None # This line is required for Spyder and not part of the actual example from multiprocessing import Process import os def info(title): print(title) print('module name:', __name__) print('parent process:', os.getppid()) print('process id:

Save params between script runs in iPython console

你。 提交于 2019-12-14 03:06:45
问题 I want to find iPython console equivalent to the Spyder console command. When I use Spyder app all my variables are saved between script runs. By that I don't only mean I can inspect the values after script finished running but that those values will be preserved within next script run. Spyder console command (doesn't work in iPython console): runfile('some_file.py', wdir='/some/project/folder') There is a similar command in iPython console: %run -i "some_script.py" The problem is that this

Downgrading matplotlib throws bad key errors in spyder IDE

被刻印的时光 ゝ 提交于 2019-12-14 02:12:20
问题 I am running Python 2.7.3 on a Ubuntu 12.04 LTS distribution. I use spyder 2.9.1 as IDE. As detailed in another Stackoverflow post of mine, I upgraded matplotlib from 1.1 to 1.5.1 only to find that there are acknowledged clashes between the IDE and matplotlib 1.5.1. I then downgraded matlplotlib from 1.5.1 to 1.4.3 , the previously stable version. I gained back the core functionalities of spyder that went lost with the upgrade. However, now the console throws the following warnings: Python 2

google-api-python-client doesn't work and makes Spyder to fail when starting

拥有回忆 提交于 2019-12-13 21:21:14
问题 I installed google-api-python-client on my Ubuntu 13.04 with sudo easy_install --upgrade google-api-python-client as it is said here. After that I tried to translate something in python with it. I took the code from here. >>> from apiclient.discovery import build >>> service = build('translate', 'v2', developerKey='MyApiKey') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.1-py2.7.egg/oauth2client

how to show variable in Spyder Variable explore while debugging?

余生颓废 提交于 2019-12-13 18:39:02
问题 Spyder Variable explore only show variables when i run a python script. But while debugging, there is nothing in Spyder Variable explore. how to set? 回答1: This was fixed in Spyder 3.2 , which was released in July of 2017. 来源: https://stackoverflow.com/questions/42546031/how-to-show-variable-in-spyder-variable-explore-while-debugging

Shortcut for opening current object in Object Inspector

旧街凉风 提交于 2019-12-13 13:43:10
问题 I believe there is a shortcut in Spyder to open the current object (i.e. the object where the flashing text cursor is) in the Object Inspector. What is it? 回答1: Do you mean "inspect current object"? The default in the console is Ctrl+I. Menu -> Tools -> Preferences -> Keyboard shortcuts and then find the name in the table in the right part of the window. 来源: https://stackoverflow.com/questions/23667431/shortcut-for-opening-current-object-in-object-inspector