Questions tagged [spyder]

1

votes
2

answer
156

Views

Stop showing plots in spyder

I have scripts that make lots of plots. I save them directly with plt.savefig() rather than plt.show() so I don't have to close all the windows. In spyder, they all show up in the console if I use inline (meaning I have to scroll way back to see other output), and they all show up in separate window...
andbeonetraveler
1

votes
2

answer
51

Views

Python, how to install scikit-image when the installation appears broken

I'm a newbie in Python, coming from R, and I'm not a programmer, so please be patient if my question is quite silly or trivial, but I cannot find a solution by myself. I'm using Python 3.7 in Spyder, in a Windows 10 machine. I'm following this tutorial, and I've understood that I need the scikit-im...
s_t
0

votes
0

answer
3

Views

error: (-212) Unknown layer type: shortcut in function cv::dnn::darknet::ReadDarknetFromCfgFile"

This line of code is running on pycharm but not on Spyder. As this module is made by my friend and i want to integrate in my module. The thing is the same module is running on his laptop in the same ide(Spyder) but not on mine. it is really frustrating me.. The line net = cv.dnn.readNetFromDarknet(m...
Mohd Nabeel
1

votes
4

answer
58

Views

How to split a pandas dataframe by each row and include the header for each new dataframe created?

newbie to Python. How can I split the dataframe by each row and create a new dataframe including the header. My end goal is to use the docx library to put a table of data (created from the dataframe) into word. An example of how the current datafranme looks: x y z 1 4 5 4 2 4 3 5 5 What I would lik...
m3214
1

votes
0

answer
1.1k

Views

ModuleNotFoundError: No module named 'deap' in Spyder3

I've got this same error on both Windows 10 and Raspbian. I checked here but doesn't help me. 'pip install deap' downloads fine, but when I execute a DEAP sample code, I get the Module Not Found Error.
cupofcalculus
1

votes
0

answer
1.1k

Views

Spyder launching

Hi I'm new to Anaconda and Spyder and I'm having some problems when running spyder. Firstly, when I write 'spyder' in Terminal, while it starts it gives me this code: [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0 [warn] kq_init: detected broken kqueue; not using.: Undefined...
1

votes
0

answer
2.9k

Views

Python - How do I get my GUI to display in Spyder

I'm new to creating GUI's in Python and can't seem to get over the first hurdle. I'm using Anaconda - Spyder and I normally run all (mainly mathematical) code through this (and the IPython console?). My issue is that when I run the code below I'm expecting it to display a simple blank window but not...
Steven Goddard
1

votes
0

answer
264

Views

PyInstaller issue with creating working executable

I've created a Windows 64-bit desktop app and it works when I run it from Spyder (part of Anaconda) and I'm using pyinstaller 3.3.1 (using the terminal within Anaconda) to create an EXE, the CLI code I'm using is: pyinstaller --clean -w -F -i 'C:\Users\User\Python_program\icon.ico' program.pyw I go...
hsc1000
1

votes
0

answer
3k

Views

Import Error: Cannot import name '_path' PYTHON

I know other people went through this kind of problem but I still can't fix the problem. I just began to programming. I use spyder IDE and get the following error when I run the code. File 'C:\Users\kaany\AppData\Roaming\Python\Python36\site-packages\matplotlib\path.py', line 25, in from . import _...
Kaan Yilmaz
1

votes
0

answer
183

Views

Cannot find spyder after anaconda installation.

I installed anaconda on my laptop (windows 10) and the sypder IDE was automatically installed with the Anaconda distribution. Everything seems to work fine. However, I tried installing Anaconda on a different pc (windows 7), and I cannot find spyder. Wasn't it supposed to come with the Anaconda dist...
Artus
1

votes
2

answer
190

Views

while using responce.css in scrapy it shows error invalid syntax

Here is my code import scrapy class spider1(scrapy.Spider): name= 'Wikiipedia' start_urls = ['https://en.wikipedia.org/wiki/Battery_(electricity)'] def parsed(self, response): print response.css('h1#firstHeading::text').extract() When executed in command prompt it shows the following error print res...
Charan2705
1

votes
0

answer
223

Views

Cannot start spyder3 on Ubuntu 16.04: missing modules even though they are installed

After a bunch of problems with Anaconda, I'm trying to set up an environment for machine learning and DNN's on Ubuntu 16.04.3, without using Anaconda. (Mostly due to my gpu compute capability being 3.0 and the conda versions of tensorflow require a minimum compute capability of 3.5). If I use python...
JLC
1

votes
0

answer
163

Views

Buildozer failed while compiling into APK

Here is the app: #!/usr/bin/env python2 # -*- coding: utf-8 -*- ''' Created on Sat Feb 3 23:11:38 2018 @author: djaber ''' from kivy.app import App from kivy.uix.scatter import Scatter #from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.floatlayout import FloatLayout...
Djaber Berrian
1

votes
2

answer
81

Views

Issues with WinPython after installing Docking Station Driver

I am using Spyder through the WinPython-64bit-3.6.3.0Qt5 distribution on my Windows 7 Laptop. To add a third screen to my Laptop I started using a USB 3.0 Docking Station. After Installing the drivers Spyder won't launch, neither will the WinPython Control Panel. These are the drivers I installed:...
H4genT
1

votes
3

answer
593

Views

Write a python script that enters commands on an ubuntu terminal?

I am using spyder on ubuntu 16.04. I want to write a script that will execute several commands in the same linux terminal. First I want to open a terminal, then ssh into another computer, then enter my password, then continuing entering commands. I have tried os.system(command) but this does not op...
Robot12341
1

votes
0

answer
282

Views

How to view graph created by cufflinks/plotly using spyder IDE

I'm running the code below to try and create a simple scatter plot of of the dataframe OAT_df. The code runs fine but nothing appears? How do I find the graph that is produced? See code below OAT_df.iplot(kind = 'scatter', filename = 'cufflinks/simple-line')
Julie
1

votes
1

answer
44

Views

Jupyter misdisplying Python lists with Arabic and alphanumeric elements

I am running into a display problem in Jupyter (both Classic and JupyterLab) for lists that include Arabic string elements and Latin Alphanumeric string elements. For example, if you run: en = '7X' print (en) ar = 'عربي' print (ar) print ([en, ar]) print ([ar, en]) Here is what you get: Obviousl...
Muhamed Al Khalil
1

votes
1

answer
194

Views

Spyder - IPython console - enable printing across the screen width

I am using the IPython console through Spyder. Is it possible to allow the console to print across the entire screen? The included picture shows the amount of empty space in the console. It's especially frustrating when I print a dataframe with many columns and I'm limited to seeing 6 at a time.
jstauss
1

votes
0

answer
425

Views

How do I control an arduino servo through a python IDE?

I am using pyserial to communicate with my arduino on com5. Everythin works well when I use IDLE, BUT then when I use Spyder the servo does not rotate. I know it connects however, because I get RX blinks on the Arduino uno every 2 seconds, showing that time.sleep is firing, but no rotation. Again,...
Traviccc
0

votes
0

answer
3

Views

Name Error: global name 'BaseFunction' is not defined

I'm following a pygame tutorial (thenewboston) and I'm having some problem with pyOpenGL. I'm using python 2.7 on anaconda-spyder3.3.4 Here's the code: from OpenGL.GL import * import pygame from pygame.locals import * from OpenGL.GLU import * vertices = ( (1, -1, -1), (1, 1, -1), (-1, 1, -1), (-1, -...
Wannalearnalot
1

votes
0

answer
54

Views

I can't Seem to Debug in Spyder 3.6

I am entering breakpoints and selecting code and hitting Ctrl+F11. I thought I could do this and step through Python code one line at a time. This is exactly how it works in VBA, VB.NET, and C#.NET. I'm not sure why I can't step through the code one line at a time using Spyder. Am I missing some...
ryguy72
1

votes
1

answer
78

Views

Label Encoder is not creating dummy variables

import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset=pd.read_csv('Churn_Modelling.csv') X=dataset.iloc[:, 3:13] Y=dataset.iloc[:, 13] from sklearn.preprocessing import LabelEncoder label_en1=LabelEncoder() X.values[:, 1]=label_en1.fit_transform(X.values[:, 1]) label_en2=La...
Pavan Borole
1

votes
1

answer
208

Views

Could not import/install any library in python

Python was working file in my machine until yesterday night. When I run my spyder I get, An error occurred while starting the kernel Error in sitecustomize; set PYTHONVERBOSE for traceback: ImportError: DLL load failed: Access is denied. If I try to install any module or import I get the below err...
chandru
1

votes
0

answer
996

Views

Python ModuleNotFoundError: No module named 'paramiko'

I am using Spyder in Windows machine to execute below Python program. But the program fails with error message 'ModuleNotFoundError: No module named 'paramiko'' I installed paramiko by going to command line . So I know paramiko is installed. But it is showing error from Spyder. Can you please help...
Biju Oommen
1

votes
1

answer
246

Views

How to configure the hive.Connection() to pass Hive the settings I want?

I am running Spyder 3.2.8 on Ubuntu 17.10. I would like to pass Hive that is on remote cluster to give names to column names using the set hive.cli.print.header=true; command. Here is what I have done so far: con = hive.Connection(host='name', port=some port, username='usr', configuration='hive.cl...
steves
1

votes
0

answer
213

Views

Spyder does not run new changes in code

I am trying to update Python 3.6 code with Spyder 3.2.4 (through Anaconda), but when I make a change to the code that I am working on and attempt to run it, it will run the code that I started the session with. Does anyone know of any solutions to this?
Chance
1

votes
1

answer
52

Views

Variable explorer changes data type

I am using Spyder 3.2.7 and am using the Variable explorer. I have written a customized class based on dictionary class DateScheme(dict): ''' Container object for Date Schemes Dictionary-like object that exposes its keys as attributes. ''' def __init__(self, name): self.name = name # other keys omit...
Westfalenmats
1

votes
1

answer
102

Views

__call__ from metaclass shadows signature of __init__

I would like to have in the code underneath that when i type instance_of_A = A(, that the name of the supposed arguments is init_argumentA and not *meta_args, **meta_kwargs. But unfortunatally, the arguments of the __call__ method of the metaclass are shown. class Meta(type): def __call__(cls,...
NotableQuestioner
1

votes
0

answer
219

Views

'Error compiling Cython file error' from one day to another

I use a lot of special characters from Hun language, and there were no problems previously. Now they all give errors when running the whole script (F9). It still runs perfect when running locally (select + F5). Fúú='bar' Traceback: C:\Users\my name\.ipython\cython\_cython_magic_21a3824690cdb52a9fe...
Chris
1

votes
0

answer
149

Views

UnicodeEncodeError: 'charmap' codec can't encode characters - Python and Spyder

I am trying to follow an NLP example from: https://blog.insightdatascience.com/how-to-solve-90-of-nlp-problems-a-step-by-step-guide-fda605278e4e The data set and jupyternotebook file can be found here: https://github.com/hundredblocks/concrete_NLP_tutorial/blob/master/NLP_notebook.ipynb The provided...
1

votes
0

answer
27

Views

pyplot opens windows before plt.show()

I installed a fresh version of spyder on a new PC and i'm having a problem with pyplot. Usually, pyplot would not show a window until I invoked plt.show() Now, whenever I invoke plt.figure() or plt.subplots() a new, empty window appears. The problem with this is that the windows does not have the 'C...
Brian De La Haye
1

votes
0

answer
373

Views

Can't open .py file from Spyder after downloading Anaconda Navigator

Even after looking through numerous topics about this matter, I have been unable to find a solution for my predicament. I have recently downloaded Anaconda navigator v.1.7.0 from which I can use Spyder v3.2.6 has an IDE. I would like to open .py scripts from file explorer with Spyder has default, bu...
MorningGlory
1

votes
0

answer
85

Views

Rodeo giving error on Excel import working in Spyder

Full disclosure: I am a total beginner when it comes to Python in particular and programming in general. So please bear with me. Today I tried for the first time to play around some datasets on my own, outside of the sandboxed environment of online courses. I downloaded both Anaconda and Rodeo (whic...
IgorM
1

votes
0

answer
178

Views

An error ocurred while starting the kernel 2

I can run this code and everything is OK: from keras.datasets import mnist def plot_history(net_history): history = net_history.history import matplotlib.pyplot as plt losses = history['loss'] val_losses = history['val_loss'] accuracies = history['acc'] val_accuracies = history['val_acc'] plt.xlabel...
user3675896
1

votes
1

answer
67

Views

Problems running pygame script

Currently trying to run a pygame script. The Script itself is fine however I think the installation is causing me some problems. I am using a mac and my script is located on my desktop. If I would like to load images on to the script I must place this in '/users/himansu' In addition I am using spyde...
Himansu Odedra
1

votes
0

answer
240

Views

Python Flask within Spyder - Code Updates not being Reflected

I am developing a Python Flask application within Spyder however, whenever I save code, the changes are not being reflected in the browser. For instance, if I change < print 'Hello World' > to < print 'Hello World 123' >, the changes are not being reflected when I save the code and refresh the brows...
kieran_mol
1

votes
1

answer
128

Views

Representing complex objects in a Python enum

I am working with a graph-based framework that consists of several types of nodes and relations. Each of these types has some meta-properties that I would like to be able to access easily. To represent these types, I figured that an enum would be the way to go. I'm still relatively new to Python, b...
thijsfranck
1

votes
0

answer
264

Views

Could not Initialize GLX after Conda Update --All

Problem Description I'm using Spyder on a remote server by SSH and X11 forwarding. After I use conda update --all , spyder stopped launching and has the error: Could not initialize GLX. I have tried adding these lines in start.py import ctypes ctypes.CDLL('libGL.so.1', mode=ctypes.RTLD_GLOBAL) from...
Thanh Nguyen
1

votes
1

answer
687

Views

Anaconda: find version with Spyder IDE

I just ran into an issue. I had an installation of Anaconda from 2016, it was version 4.1. I then downloaded a new version of Anaconda version 5.1. I installed this version on windows 7. I have now 3 versions of Anaconda on my windows machine, one is for Anaconda with python-2 (v4.1 anaconda), and...
Palu
1

votes
0

answer
533

Views

TypeError: ufunc 'true_divide' output (typecode 'd') could not be coerced to provided output parameter (typecode 'q')

I am trying to apply Gower distance implementation to my data frame. While it was smoothly working with the same dataset with more features, this time it gives an error when I call the Gower distance function. I import the Gower's function from another .py code in the same directory. Here is my code...
Beg

View additional questions