spyder

Python 3.x on python(x,y)?

a 夏天 提交于 2019-12-22 05:57:18
问题 I'm in the process of setting up a Matlab like environment so I downloaded the latest version of python(x,y) with all the modules that come with it and downloaded python 3.4.1. Does python(x,y) not run the latest version of python? I noticed because the python(x,y) shell doesn't auto calculate mathematical operations into floats which I read is a difference between python 2.x and 3.x. Do I just have to wait for a new release of (x,y) or am I missing something here? 回答1: You can make Python 2

Python ImportError for strptime in spyder for windows 7

为君一笑 提交于 2019-12-22 04:42:31
问题 I can't for the life of me figure out what is causing this very odd error. I am running a script in python 2.7 in the spyder IDE for windows 7. It uses datetime.datetime.strptime at one point. I can run the code once and it seems fine (although I haven't finished debugging, so exceptions have been raised and it hasn't completed normally yet), then if I try running it again I get the following (end of traceback only is shown): File "C:\path\to\test.py", line 220, in std_imp self.data[key]

AttributeError when reading a pickle file

*爱你&永不变心* 提交于 2019-12-21 17:52:30
问题 I get the following error when I'm reading my .pkl files on spyder (python 3.6.5): IN: with open(file, "rb") as f: data = pickle.load(f) Traceback (most recent call last): File "<ipython-input-5-d9796b902b88>", line 2, in <module> data = pickle.load(f) AttributeError: Can't get attribute 'Signal' on <module '__main__' from 'C:\\Python36\\lib\\site-packages\\spyder\\utils\\ipython\\start_kernel.py'> The context: My program is made of one file: program.py In the program, a class Signal is

how to get spyder's python recognize external packages on MacOS X?

北城余情 提交于 2019-12-21 04:32:04
问题 I have spyderlib installed on my MacOS X (10.6.8) using the official dmg file. In parallel, I have installed packages using both pip and homebrew from the terminal (i.e. opencv, gdal...). As Spyder is using its own python version, I cannot access my external packages within Spyder. When Homebrew install a package, it instals it in the /usr/local/lib... directory, which is not avalaible to add using the Python Path manager of Spyder.The entire directory /usr/... is hidden. The only relevant

how to get spyder's python recognize external packages on MacOS X?

淺唱寂寞╮ 提交于 2019-12-21 04:32:01
问题 I have spyderlib installed on my MacOS X (10.6.8) using the official dmg file. In parallel, I have installed packages using both pip and homebrew from the terminal (i.e. opencv, gdal...). As Spyder is using its own python version, I cannot access my external packages within Spyder. When Homebrew install a package, it instals it in the /usr/local/lib... directory, which is not avalaible to add using the Python Path manager of Spyder.The entire directory /usr/... is hidden. The only relevant

Spyder missing Object Inspector

喜欢而已 提交于 2019-12-20 16:23:45
问题 I just installed Anaconda and running Spyder I cannot find the Object Inspector. Hitting Ctrl+I has no effect and in the View/Panes menu there is no item Object Inspector. I have seen videos and tutorials that show the Object Inspector. What is happening? 回答1: The "Object Inspector" is now called "Help" (from Spyder version 3.0 onwards); see https://groups.google.com/forum/#!topic/spyderlib/pF7KmSKDFXc . However, the Ctrl-I shortcut has not been changed, so I'm not sure what's happening with

Avoid 'Reloaded modules: <module_name>' message in Python

余生长醉 提交于 2019-12-20 14:19:19
问题 I am getting the above mentioned error: 'Reloaded modules: <module_name>' Since I want to keep my code as it is, i'd like to disable this warning. How can this be done? I am using Spyder 3.2.3. 回答1: Go to Tools -> Preferences -> Python Interpreter and you will find User Module Reloader. Just deselect the checkbox with text as Show reloaded module list. 回答2: In spyder 2.3 you need to do the following: Go to Tools -> Preferences -> Console -> Advanced settings then scroll down to: desellect

Anaconda Navigator won't launch (windows 10)

戏子无情 提交于 2019-12-20 10:42:22
问题 Anaconda navigator won't launch, I tried reinstalling it, that did not work either. anancondas' command prompt shows an error message. I've tried googling the answer, I guess I'm bad at it. this is what I see after opening anaconda prompt p.s. I use spyder on it 回答1: You need to run the cmd prompt from the Scripts directory of Anaconda where ever you have the Anaconda parent folder installed. I happen to have in the root directory of the C drive on my Windows machine. If you are not familiar

'Syntax Error: invalid syntax' for no apparent reason

不打扰是莪最后的温柔 提交于 2019-12-20 08:57:59
问题 I've been trying to get a fix and can't find why the error keeps appearing. Pmin,Pmax,w,fi1 and fi2 have all been assigned finite values guess=Pmin+(Pmax-Pmin)*((1-w**2)*fi1+(w**2)*fi2) When i remove this line from the code, the same error appears at the next line of code, again for no reason I can think of Edit: Here is the chunk of code I was referring to: def Psat(self, T): pop= self.getPborder(T) boolean=int(pop[0]) P1=pop[1] P2=pop[2] if boolean: Pmin = float(min([P1, P2])) Pmax = float

Interactive Python: cannot get `%lprun` to work, although line_profiler is imported properly

可紊 提交于 2019-12-20 08:47:12
问题 Problem Most iPython "magic functions" work fine for me right off the bat: %hist , %time , %prun , etc. However, I noticed that %lprun could not be found with iPython as I'd installed it originally. Attempt to Resolve I then discovered that I should install the line_profiler module. I have installed this module, but still cannot seem to get the magic function to work correctly. If I attempt to call %lprun , iPython still cannot find the function. If I call it with the full name ( line