spyder

Code autocompletion 'partially' works in the editor pane of Spyder3

这一生的挚爱 提交于 2019-12-12 20:43:13
问题 I installed spyder3 through miniconda3 on my win10 PC. Autocompletion works perfectly in the Ipython console pane but not in the editor pane. In the editor pane it only list partial completion options when I use TAB or Ctrl + Space This is my Editor preferences settings which is almost default. Should Editor pane's auto completion ability be 'weaker' than that of Ipython pane in Spyder3? 回答1: ( Spyder maintainer here ) It's a true and sad reality, but our Editor can't show the same

Closing a file after using np.load (using Spyder)

◇◆丶佛笑我妖孽 提交于 2019-12-12 19:04:24
问题 I am loading a file: a= np.load('myfile.npz') and then doing things with a After a while I regenerate myfile.npz (on a remote machine). When I attempt to copy the file across (using WinSCP) from the remote machine it fails, reporting: System Error. Code: 32. The process cannot access the file because it is being used by another process. I've tried this: >>> a.fid <open file 'myfile.npz', mode 'rb' at 0x058A78B8> >>> a.fid.close() >>> a.fid <closed file 'myfile.npz', mode 'rb' at 0x058A78B8>

why does my print function (in multiprocessing) print nothing?

谁都会走 提交于 2019-12-12 13:34:27
问题 why does my print function (in python multiprocess) print nothing? from multiprocessing import Process, Queue import os, time, random def write(q): print('Process to write: %s' % os.getpid()) for value in ['A', 'B', 'C']: print('Put %s to queue...' % value) q.put(value) time.sleep(random.random()) def read(q): print('Process to read: %s' % os.getpid()) while True: value = q.get(True) print('Get %s from queue.' % value) if __name__=='__main__': q = Queue() pw = Process(target=write, args=(q,))

Newly-assignmed variables not showing up in Spyder's variable explorer

大兔子大兔子 提交于 2019-12-12 10:59:13
问题 I'm writing Python on Spyder. Please see my code below: import pandas as pd data = pd.io.excel.read_excel('Data.xls') CMT_column = data['CMT'] "data" contains a column called "CMT." What I'm trying to do is create a variable called "CMT_column" that contains the values of the "CMT" column. Here's the problem. After I run the code, only "data" appears in the variable explorer. "CMT_column" is not there. But if I call "CMT_column" in the IPython console, it shows the values of "CMT" as expected

No module named pandas_datareader

不打扰是莪最后的温柔 提交于 2019-12-12 08:03:50
问题 I have just installed pandas_datareader using pip install pandas-datareader which ran successfully. Now I am trying to use it for a tutorial and I am getting this error when I try to import. import pandas_datareader as pdr ModuleNotFoundError: No module named 'pandas_datareader' This is the link to the tutorial. https://www.datacamp.com/community/tutorials/finance-python-trading#gs.DgsO1BY Any ideas? 回答1: Type into Terminal: pip install pandas_datareader That's it 回答2: In your Anaconda Prompt

QtConse in Spyder cannot use multiprocessing.Manager

久未见 提交于 2019-12-12 06:50:10
问题 If I open IPython QtConsole standalone and run the following: from multiprocessing import Manager manager = Manager() It worked fine. However, if I use the IPython Console inside Spyder, that specific console stopped responding. I am using Windows 64 bit, Python 3.3.5 64 bit, Spyder 2.3.1. Could anyone please help me with this? 来源: https://stackoverflow.com/questions/26428296/qtconse-in-spyder-cannot-use-multiprocessing-manager

GAE works but import webapp2 failed in Spyder

只谈情不闲聊 提交于 2019-12-12 05:16:31
问题 this is simple code to test the redirection in html.and I use Spyder to write Python Code. import webapp2 from valid_day import valid_day from valid_month import valid_month from valid_year import valid_year from html_escape import escape_html form = """ <form method="post"> What is your birthday? <br> <label> Month <input type="text" name="month" value="%(month)s"> </label> <label> Day <input type="text" name="day" value="%(day)s"> </label> <label> Year <input type="text" name="year" value="

modified PYTHONPATH not recognized by Anaconda Spyder

时光毁灭记忆、已成空白 提交于 2019-12-12 04:21:38
问题 I use my .bash_profile to add a directory to PYTHONPATH export PYTHONPATH="${PYTHONPATH}:/Users/selah/newdir" In my Anaconda installation of Spyder the path I added does not show up when I type: import sys sys.paths However when i do the same in Jupyter notebook, or terminal python it does show up. Why the discrepancy? Is there a way to get Spyder to recognize my modified PYTHONPATH? 回答1: ( Spyder developer here ) You need to start Spyder from the command line for your changes to be detected

spyder/juypter not working after downgrading python

旧街凉风 提交于 2019-12-12 04:10:28
问题 I had to download my python version from 3.5 to 3.4 because one of the packages I needed wasn't supported in 3.5. I downgraded the python version using the conda command prompt, and everything worked fine - got my package to install with all its dependencies and no conflicts. But now when I try to open Juypter notebook or Spyder, nothing happens. My IPython works just fine. I'm thinking maybe i have to downgrade Juypter and Spyder, but I'm not sure. Anyone have any ideas? 回答1: After a day of

Spyder: Ipython console stuck

廉价感情. 提交于 2019-12-12 04:09:19
问题 In Spyder, the Ipython console gets stuck for no apparent reason. Often it gets stuck on the ...: After executing code. Hitting the red "stop the current command" button does nothing to correct the issue. Even worse, I have had it completely give up and not even start up after restarting the program. Any ideas what's going on? I have the latest versions installed. Especially this seems to happen when calculating cross correlation using Numpy, example: CrossCorrelate = np.correlate(In1,In2,