Hello all,
Trying to run "python Spectrogram.py" but its says theres no file or directory available. I have downloaded, python 2.7.5, anaconda, i have searched for python --version on command window and get 'Python 2.7.5 :: Anaconda 1.7.0 (32-bit)' in the response. But when i try to run the file it says 'no such file or directory'. I have also included anaconda/bin in my PATH system....any ideas would be appreciated, thank you.
FFT Project w/teensy 3.0 and anaconda
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: FFT Project w/teensy 3.0 and anaconda
Could you post the exact errors you're getting please? Sometimes the wording gives a clue to the nature of the problem.
-
- Posts: 4
- Joined: Sun Oct 20, 2013 11:26 pm
Re: FFT Project w/teensy 3.0 and anaconda
This is what im getting from my cmd.exe window
C:\Users\Robert\Anaconda> python Spectrogram.py
python: can't open file Spectrogram.py : [Errno 21] No such file or directory
C:\Users\Robert\Anaconda> python Spectrogram.py
python: can't open file Spectrogram.py : [Errno 21] No such file or directory
- Franklin97355
- Posts: 23910
- Joined: Mon Apr 21, 2008 2:33 pm
Re: FFT Project w/teensy 3.0 and anaconda
Have you tried navigating to the folder where the .py file resides and running it from there?
-
- Posts: 1
- Joined: Fri Jun 20, 2014 4:00 am
Re: FFT Project w/teensy 3.0 and anaconda
Hi!
I'm having some problems running python scrypt with Anaconda. Two months ago everything worked well, but now, after I had to format my laptop and install everything all over again, I'm getting this error:
Traceback (most recent call last):
File "Spectrogram.py", line 23, in <module>
ui = SpectrogramUI.MainWindow(devices)
File "C:\Anaconda\SpectrogramUI.py", line 142, in __init__
main.setLayout(self._setupMainLayout())
File "C:\Anaconda\SpectrogramUI.py", line 195, in _setupMainLayout
layout.addWidget(self.spectrogram)
TypeError: 'PySide.QtGui.QBoxLayout.addWidget' called with wrong argument types:
PySide.QtGui.QBoxLayout.addWidget(SpectrogramCanvas)
Supported signatures:
PySide.QtGui.QBoxLayout.addWidget(PySide.QtGui.QWidget, int = 0, PySide.QtCore
.Qt.Alignment = 0)
This happens after typing python Spectrogram.py.
Thanks for the help, I hope we can work this out.
I'm having some problems running python scrypt with Anaconda. Two months ago everything worked well, but now, after I had to format my laptop and install everything all over again, I'm getting this error:
Traceback (most recent call last):
File "Spectrogram.py", line 23, in <module>
ui = SpectrogramUI.MainWindow(devices)
File "C:\Anaconda\SpectrogramUI.py", line 142, in __init__
main.setLayout(self._setupMainLayout())
File "C:\Anaconda\SpectrogramUI.py", line 195, in _setupMainLayout
layout.addWidget(self.spectrogram)
TypeError: 'PySide.QtGui.QBoxLayout.addWidget' called with wrong argument types:
PySide.QtGui.QBoxLayout.addWidget(SpectrogramCanvas)
Supported signatures:
PySide.QtGui.QBoxLayout.addWidget(PySide.QtGui.QWidget, int = 0, PySide.QtCore
.Qt.Alignment = 0)
This happens after typing python Spectrogram.py.
Thanks for the help, I hope we can work this out.
- tdicola
- Posts: 1074
- Joined: Thu Oct 17, 2013 9:11 pm
Re: FFT Project w/teensy 3.0 and anaconda
Interesting, it looks like Anaconda recently changed to switch from PySide to PyQt as a Qt binding in their 2.0 update. It seems like this isn't fully compatible and is causing the error. Can you try using the Anaconda 1.9.2 version installer from their archive here: http://repo.continuum.io/archive/ Let's see if that gives you the older version with the PySide library.
-
- Posts: 3
- Joined: Thu Jul 17, 2014 8:30 pm
Re: FFT Project w/teensy 3.0 and anaconda
hi tony,
I am getting the same error
will anaconda 1.9.2. fix this? can I quickly edit the code to work with the newer version (i.e., add the 2 null values maybe?) or will that be a lot of work
edit: adding the null values did not work, but adding to the top of SpectrogramUI.py worked!! :) leaving this here for future users, maybe suggest adding it to the official code??? cheers
I am getting the same error
Code: Select all
TypeError: 'PySide.QtGui.QBoxLayout.addWidget' called with wrong argument types:
PySide.QtGui.QBoxLayout.addWidget(SpectrogramCanvas)
Supported signatures:
PySide.QtGui.QBoxLayout.addWidget(PySide.QtGui.QWidget, int = 0, PySide.QtCore.Qt.Alignment = 0)
edit: adding the null values did not work, but adding
Code: Select all
matplotlib.rcParams['backend.qt4']='PySide'
- tdicola
- Posts: 1074
- Joined: Thu Oct 17, 2013 9:11 pm
Re: FFT Project w/teensy 3.0 and anaconda
Oh nice, thanks for tracking down the fix. I'll update the code now to include that line. Thanks!
Please be positive and constructive with your questions and comments.