spyder

Override global variable inside function not working with Spyder 4

久未见 提交于 2020-06-21 05:38:34
问题 I try to override globally defined Dataframes from within a function. Somehow the global values do not change, printing the dataframes within the functions works with the expected values. import pandas as pd rawData = pd.read_csv("music.csv") appTitles =pd.DataFrame #also with pd.DataFrame() wont get affected def loadTitles(df=rawData): global appTitles appTitles = pd.DataFrame({'Title' : df['title']}) print(appTitles) return appTitles #(second 'print' to screen) #RUN FILE #CALL FUNCTION:

How to Fix Runtime Error: Cannot close a running event loop - Python Discord Bot

耗尽温柔 提交于 2020-06-15 21:22:06
问题 I am trying to create a Discord bot with Python, however whenever I run the sample code here: import discord client = discord.Client() @client.event async def on_message(message): # we do not want the bot to reply to itself if message.author == client.user: return if message.content.startswith('!hello'): msg = 'Hello {0.author.mention}'.format(message) await client.send_message(message.channel, msg) @client.event async def on_ready(): print('Logged in as') print(client.user.name) print(client

ImportError: No module named 'google'

懵懂的女人 提交于 2020-06-07 13:39:10
问题 This is not a duplicate. My scenario is a bit different and I could not find a solution from similar posts here. I installed Python 3.5. I ran the pip install google command and verified the modules. Google was present. I installed Anaconda 3.5 and tried to run z sample code. But I'm getting the import error. Please find the screen shot attached. What am I missing? Do I have to link my Spyder to Python installation directory in some way? Why is Spyder unable to google module? My Python

ImportError: No module named 'google'

我的梦境 提交于 2020-06-07 13:39:06
问题 This is not a duplicate. My scenario is a bit different and I could not find a solution from similar posts here. I installed Python 3.5. I ran the pip install google command and verified the modules. Google was present. I installed Anaconda 3.5 and tried to run z sample code. But I'm getting the import error. Please find the screen shot attached. What am I missing? Do I have to link my Spyder to Python installation directory in some way? Why is Spyder unable to google module? My Python

Spyder cannot launch: spyder: command not found

心已入冬 提交于 2020-05-29 07:11:38
问题 I have installed spyder by pip3 install spyder on mac. However, when I cannot launch it from bash and it would show spyder: command not found . I have follow the instructions on its Github page, and I have also have its dependencies like PyQt5 installed. Is there a way to install spyder without installing the Anaconda distribution? Thank you. 回答1: ( Spyder developer here ) The command to run Spyder when it's installed in Python 3 is spyder3 , not spyder , but only when Spyder is installed

Spyder IDE automatic indentation

别等时光非礼了梦想. 提交于 2020-05-29 07:02:05
问题 Is there any shortcut to automatically indent marked lines in the editor? For example, in MATLAB there is the CTRL+I shortcut. 回答1: Matlab's syntax can match the opening closing statements of if , while , for etc. by looking for end statements. In Python these are ambiguous and defined as the nested indentetation. Hence this cannot be reliably implemented as you cannot decide whether the succeeding if block belongs the the current for loop or it is the next block, if not indented properly. If

How to add anaconda to PATH?

馋奶兔 提交于 2020-05-17 08:51:46
问题 I downloaded Anaconda on my system (Mac OS), for now solely for the purpose of using Spyder to code in Python. I am having two issues, which are probably easy to solve for someone who is more fit with computers than me. I would be glad for help! Adding anaconda to the PATH or not, and if yes, how? In this thread here I got help with updating Anaconda and Spyder, since executing the lines conda update anaconda and conda update spyder would result in zsh: command not found . Apparently this has

How to add anaconda to PATH?

我是研究僧i 提交于 2020-05-17 08:51:12
问题 I downloaded Anaconda on my system (Mac OS), for now solely for the purpose of using Spyder to code in Python. I am having two issues, which are probably easy to solve for someone who is more fit with computers than me. I would be glad for help! Adding anaconda to the PATH or not, and if yes, how? In this thread here I got help with updating Anaconda and Spyder, since executing the lines conda update anaconda and conda update spyder would result in zsh: command not found . Apparently this has

How to add anaconda to PATH?

泄露秘密 提交于 2020-05-17 08:51:05
问题 I downloaded Anaconda on my system (Mac OS), for now solely for the purpose of using Spyder to code in Python. I am having two issues, which are probably easy to solve for someone who is more fit with computers than me. I would be glad for help! Adding anaconda to the PATH or not, and if yes, how? In this thread here I got help with updating Anaconda and Spyder, since executing the lines conda update anaconda and conda update spyder would result in zsh: command not found . Apparently this has

What are fallback completions in Spyder?

随声附和 提交于 2020-05-16 08:59:16
问题 There is an option in the Spyder IDE (Tools->Preferences->Completion and linting->Advanced) to activate fallback completions : What are fallback completions, how are they supposed to work and help? I have googled it and not found a description. Note this question was inspired by this question complaining (implicitly) about fallback completions: How to disable keyword / text suggestion in Spyder 4? There, it isn't really explained what this feature is supposed to be, how it is supposed to work