Debian :: Python Script Errors ?

Jun 5, 2009

I'm trying to get a python script to run on my Netgear ReadyNas NV+, but keeping running into an indentation error. The script should be using feedparser to monitor an RSS feed (like a yahoo pipe) and automatically download the .torrent files. I've checked the script, and I do not believe I am mixing spaces and tabs anywhere, but I'm still not sure why it will not run.

I've already installed python and the python feedparser (required for this script). Or, at least I believe I have the feedparser installed--I'm not sure how to verify it was installed successfully without running this script.

I'd love to know if there is something glaringly obvious that I'm missing here. Script and error message below:

Script:

Code:

View 3 Replies


ADVERTISEMENT

Fedora :: Giving Errors About Python At Bootup?

Sep 1, 2009

I had some problems and had to upgrade my motherboard. I chose the same manufacturer and haven't had any major problems booting into Fedora 11. (I was totally amazed by this BTW).The only thing is that I have 8 GBs of memory in my computer and System-monitor now says that I only have 3.2. Lastly my nvidia driver which is working correctly, is giving errors about python at bootup. Something about glib being presentAnother weird thing is that GRUB will not let me interrupt it either during normal usage nor with a live CD loaded. This also started happening after I installed Fedora 11 on my old board.

View 9 Replies View Related

Programming :: Make Python Programs Run Without Entering The Command Python?

Mar 22, 2009

I want to be able to do

sudo ./program.py

instead of always having to do

sudo python program.py

What do I need to change?

View 5 Replies View Related

Programming :: Python - Get Text File Data Into An Array On Python?

Nov 30, 2009

I've already used line split stuff to transform my data into something like this in a text file:

Code:

['1', '1', '3', '20.7505207']
['2', '1', '3', '23.0488319']
['3', '1', '3', '-1.5768747']
['4', '1', '3', '-26.4772491']

[code]....

How can I get this on a python program so I can manipulate it as an array?

View 3 Replies View Related

Debian :: Get Rid Of Python?

Feb 9, 2010

i'm just a desktop end user; on line banking, email, videos, im, music, etc. the regular stuff. can i get rid of python? i don't program anything. don't plan on it. never gave it even a fleeting thought. do i need it? does any other program or app depend on python? can i make a clean sweep of it? and if i can, what's the best way of doing it?

View 5 Replies View Related

General :: Get Apt-get To Install Python Packages For A Different Version Of Python?

Oct 27, 2010

in ubuntu 10.10, I have installed python 2.7. I would like to use apt-get to install packages to this version of python but I haven't been able to figure out howThings I have tried without success:changing the symlink at /usr/bin/python to point to /usr/bin/python2.7 - even after doing this apt-get still installs stuff to python2.6.Set up python2.7 as the primary alternative using update-alternatives - doesn't work

View 3 Replies View Related

Debian :: Python 2.6.4 On Etch 4

Apr 15, 2010

I was able to compile python 2.6.5 on debian 4 etch successfully. The contents of /usr/share/python/python_defaults are now like this:

Typing "python" on terminal now starts the correct version which is 2.6.5.

The next thing I installed wxPython from wxWidgets repository. I followed the instruction explained here:

[url]

When installation was about to finish, I got this error:

I am sure something I have missed something before installing wxPython. It seems it's related to "python_defaults", but I am not sure.

View 3 Replies View Related

Software :: Python 3 Want Situation For Python 2 And Become Stop?

Jul 17, 2010

Python 3 want situation for python 2?Python 2 become stop?

View 1 Replies View Related

CentOS 5 :: Yum - Python-devel / Python Dependency

Jan 7, 2011

yum dependency problem please? I am running Centos 5.5. I need to install python-devel, but when I do so I get:

[Code]....

View 2 Replies View Related

Debian :: Python 2.7 Can't See OS Environment Variables

Aug 23, 2015

I'm trying to compile Ardour on jessie amd64 using the Debian source code (there's already an ardour package but I want to use different compile options). I've applied the Debian patches and have all the required dependencies installed.

Scons quits with a KeyError message from python2.7 saying that os.environ['DEB_HOST_ARCH_OS'] is not defined.

Checking with 'dpkg-archtecture -l' shows that DEB_HOST_ARCH_OS=linux, but 'print os.environ["DEB_HOST_ARCH_OS"]' in python says that name 'os' is not defined. The scons script has 'import os' at the top so it should be seeing it.

How do I make this visible to python (I'm assuming this problem is specific to the jessie python2.7 installation and not python in general)?

View 1 Replies View Related

Debian :: Can't Start Python GTK Applications

Oct 27, 2015

I use Terminator as my terminal and in the last couple of months, I need to either run

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so.6 /usr/bin/terminator
or
symbolic link /usr/local/lib/libfreetype.so.6 to the above file

In order to have the application run without the error message: You need to install the python bindings for gobject, gtk and pango to run Terminator.

I have been using the symlink method for the most part, but when I run an apt upgrade, often the /usr/local/lib/libfreetype.so.6 symblink changes to point to /usr/local/lib/libfreetype.so.6.5.0 and I have to manually re-link.

I have tried reinstalling gobject, gtk and pango packages for python but nothing has worked.

View 6 Replies View Related

Debian Installation :: Get An Error That Python.h Is Not Found?

May 20, 2010

I am trying to building freeradius from source, but I get an error that python.h is not found ? !

checking for python2.3... python2.3
checking for Python.h... no
checking for Py_Initialize in -lpython2.3... no

But both python and python-dev are installed ?

[Code].....

View 3 Replies View Related

Debian Programming :: Crontab Python Script Will Not Run

Oct 10, 2014

This python script works , but not from crontab.Here is my python script:

#more datetimedir.py
import os, datetime;
datestring = datetime.datetime.now().strftime("%Y%m%d_%H%M%S");
print (datestring);
os.mkdir(datestring);

Here is how I call it from crontab

*/30 * * * * /usr/bin/python3 /home/cwc/logs/datetimedir.py

View 2 Replies View Related

Debian :: Squezee Upgrade And Python-imaging?

Feb 16, 2011

I have recently upgraded from lenny to squezee and I noticed some problems during upgrade with some python files. Now I have same problem with them and I need to resolve it so that I can install sane:

Code:
dpkg --configure -a
Setting up python-imaging (1.1.7-2) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.5/runpy.py", line 95, in run_module
filename, loader, alter_sys)

[Code]...

aptitude -f install reports same problems with python-reportlab and python-imaging.

View 3 Replies View Related

Debian :: Tunapie Doesn't Work Under Python 2.7?

Apr 25, 2011

i am using an updated version of Debian GNU/Linux Squeeze and i just downloaded and installed tunapie from the software depositories but it doesn't work i tried to run it from a terminal and this is what it came out with

Code:
Traceback (most recent call last):
File "/usr/share/tunapie/Tunapie.py", line 23, in <module>
import wxversion
ImportError: No module named wxversion
how do i fix this

View 9 Replies View Related

Debian :: How To Fix Python-libtorrent Kept Back Package On Wheezy

Oct 11, 2015

I'm currently running Debian Wheezy (upgrading to Jessie is not possible since I'm using OpenMediaVault which only supports Wheezy) but ever since I installed Deluge BitTorrent client that I've had this python-libtorrent package as "kept back". I'd like to fix this system state but how...

A few things I've tried:

Code: Select all$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done

The following packages have been kept back:
  python-libtorrent
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Code: Select all~$ sudo apt-get install python-libtorrent
Reading package lists... Done
Building dependency tree
Reading state information... Done

[Code] .....

I have the following APT repositories on my sources which I believe are causing my problem:

Code: Select alldeb http://dh2k.omv-extras.org/debian/ stoneburner-miller main
deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu precise main

They were added through OpenMediaVault's interface when I enabled some checkboxes to be able to install Deluge.

View 6 Replies View Related

Debian :: Python Script - Debsign Caching Passphrases

Sep 4, 2010

I have a python script that I use to create Debian packages automatically for me. When running this under Ubuntu, it only requires the passphrase to be entered once to sign the changes and dsc files. However when running under Debian it is required to enter it every time. The script is using the debuild command to do the actual package building.

View 1 Replies View Related

Debian Installation :: Python-cvxopt Is Now Installed Without Glpk?

Mar 15, 2011

Why python-cvxopt is now installed without glpk?[URL]they propose to ask you.

View 3 Replies View Related

Debian :: Unable To Locate Package Python-virtinst

Sep 28, 2015

I'm trying to install some virtual machines to a dedi using KVM. So far everything seems to be working, I tested the KVM install with virsh -c qemu:///system list and it responded, however, I'm trying to now install the script for generating new vps's python-virtinst but putty is returning this error:

E: Unable to locate package python-virtinst

View 3 Replies View Related

Debian :: Browsing HTML Documentation That Comes With Python Packages?

Nov 16, 2010

There seems to be a lot of documentation automatically installed on my hard drive, is there a unified browser for all of the -doc packages? Is it just the man command? What about the html documentation that comes with python packages? Is there an easy way to browse these? As it stands, all I know how to do is navigate to the directory and open the html file explicitly, it just seems like there might be an easier way. I've googled around and don't know exactly what I'm looking for.

View 11 Replies View Related

Debian Programming :: Implementing PyGtk For Python 3.3 In Wheezy

Sep 12, 2013

I run Wheezy Xfce 64-bit. I went through the Synaptic listings and added Python 3.3.2 and Tkinter for it, and that works fine; but for some reason PyGtk is available only for Python 2.7, not for Python 3.3, unless I'm just using the wrong way to try to find it. Is there a PyGtk available for Python 3.3 in Wheezy, and, if so, how do I install it and then import it once it's installed?

View 1 Replies View Related

Debian Programming :: Python - Selenium Script Migration

Apr 3, 2014

I have a code that uses the Firefox webdriver with Selenium to execute a couple javascript commands and fetch me some info. Since Debian doesn't use Firefox by default, and Selenium doesn't recognize Iceweasel as the equivalent of Firefox (which may be reasonable, but still kinda dumb), I downloaded and extracted the firefox-28.0 bz2 folder to my desktop. Next, I used the top answer suggested here to point Selenium to the binary:

Code: Select allfrom selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
[...]
binary = FirefoxBinary('~/firefox/firefox-bin')
driver = webdriver.Firefox(firefox_binary=binary)

However, it results in this error message:

Code: Select allTraceback (most recent call last):
  File "./seltest.py", line 19, in <module>
    driver = webdriver.Firefox(firefox_binary=binary)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
    self.binary, timeout),

[Code] ....

Did I set the binary path incorrectly or something?

View 9 Replies View Related

Debian Programming :: Python - Unable To Install Matplotlib

Jul 16, 2015

I am unable to install matplotlib. I already have installed latest libfreetype and libfreetype-dev.But it still errors out on freetype, I am running Debian testing on my machine. Python is latest 3.5.b3 compiled from source and in virtual env , running the command :

pip install matplotlib

...... freetype: no [Requires freetype2 2.3 or later. Found ...] png: yes [version 1.2.50] ..... .....

* The following required packages can not be built: * freetype ....

Full error log here: [URL]....

I do not understand why requirement is not marked for compilation even though found.

View 5 Replies View Related

Debian :: Python-pkg-resources Returns Error Code

Apr 9, 2010

The system is Debian Squeeze/Sid with apt.conf set to Squeeze as the default. Most packages are from Squeeze.

I ran apt-get upgrade and it returned an error-code.

It might be it is this bug: Bug#574153: python-pkg-resources: Missing file leaves it unconfigured

I tried aptitude install -f, to hold it and to remove the package python-pkg-resources, but i am getting told the package would be in a very bad stage, and i should re-install it. That doesn't work.

View 1 Replies View Related

Debian Configuration :: PIP Installation Fails For MySQL Connector Python

Apr 6, 2016

I got assigned to a project, where the installation is done over ansible. As I'm new in linux, python, django, ansible I wanted to try this out on a empty linux debian.

Code: Select alluname -a

Linux DebianABC 3.16.0-4 amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86 64 Gnu/Linux

When I now run my ansible playbook it tries to install mysql and suddenly I get an error:

Code: Select all:stderr: DEPRECATION: --allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.

DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.

Could not find a version that satisfies the requirement mysql-connector-python==1.0.12 (from -r /home/abc/abcTest/requirements.pip (line 36)) (from versions: )

No matching distribution found for mysql-connector-python==1.0.12 (from -r /home/abc/abcTest/requirements.pip (line 36))

FATAL: all hosts have already failed -- aborting

So I checked the target machine and tried to run

pip install -vvv -r requirement.txt mysql-connector-python

As version 1.0.12 is an old version, I was searching and tried the following: [URL] ....

But also if I run the installation by direct download I have the same error message:

Code: Select allabc@DebianABC:/home/abc/abcTest$ pip install -r requirements.pip -vvv mysql-connector-python
Collecting http://cdn.mysql.com//Downloads/Connector-Python/mysql-connector-python-1.0.12.tar.gz (from -r requirements.pip (line 36))
  Starting new HTTP connection (1): cdn.mysql.com
  "GET //Downloads/Connector-Python/mysql-connector-python-1.0.12.tar.gz HTTP/1.1" 200 230923

[Code] ....

I was reading about the version requirements from PEP: [URL] .... but as the version looks ok, this should not be the problem.

View 0 Replies View Related

Debian Multimedia :: Miro Won't Start - Generates Python Error

Jul 6, 2015

Miro worked well with Wheezy. When I upgraded to Jessie Miro started generating a python error as such:

Code: Select all~$ miro
using /usr/bin/miro.real
Traceback (most recent call last):
  File "/usr/bin/miro.real", line 183, in <module>
    from miro import startfrontend
  File "/usr/lib/pymodules/python2.7/miro/startfrontend.py", line 53, in <module>

[Code] ....

I have been searching for a few weeks trying to find an answer to no avail. I tried three different kernels, renaming ~/.miro, checked all dependencies. I reported it as a bug which sat there for a few days and disappeared.

View 14 Replies View Related

Debian Multimedia :: Ported Over The Python Sopcast-player P2P Video App

Jun 21, 2010

from the Ubuntu PPA to the Mepis 8.5 community repo, and it works a treat. It would also be installable in Debian Lenny and higher, as long as you have VLC >= 0.9.4 for the built-in player (which is backported for Lenny in another post I had here) I also ported over the nonfree sp-auth deb package which it requires, only for Intel-base 32 and 64 bit CPUs (it's a 32 bit static binary that does the actual P2P). I could roll a Lenny specific package which does not use VLC if you tell it to use an external player such a mplayer or xine; is anyone interested?

View 9 Replies View Related

Debian Programming :: Searching For A List Of Strings In File With Python

Oct 14, 2013

I'm trying to search for several strings, which I have in a .txt file line by line, on another file.

So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt.

So far, I've been able to do this, to search for individual strings:

Code: Select allimport re

shakes = open("output.csv", "r")

for line in shakes:
    if re.match("STRING", line):
        print line,

How can I change this to input the strings to be searched from another file?

So far I haven't been able to.

View 3 Replies View Related

Debian Programming :: Return How Many Items Occurs In List (Python)

Jan 29, 2014

I going through the Python course on Codeacademy. I have some trouble understanding what I'm doing wrong. This is my code below:

Code: Select alldef count(sequence, item):
    total = 0
    for x in sequence:
        return x
        if x in sequence:
            total += 1
    return total
print count([1,2,1,1], 1 )

The code gives me an error: "Oops, try again. Your function fails on count([1],7). It returns 1 when it should return 0."

It should be outputting 3 because 1 occurs 3 times in the list.

View 7 Replies View Related

Debian Programming :: Packaging Shared Library With Python Wrapper

Apr 12, 2014

I have written a shared library and successfully used debhelper 9 to create a Debian package from source using a Makefile generated by cmake. I then went about writing a python wrapper to that library and wish to package that wrapper in with the library so I can have a single distributable rather than 2 separate ones.

All of my attempts so far have me placing my python source and a setup.py file in the same directory as the makefile at the time where I call debuild.

From here I have tried a couple different configurations to my debian/rules file as seen below:

Attempt 1:
# -*- makefile -*-
%:
dh $@ --with-python2 --buildsystem=python_distutils

This try seemed to package up the python stuff nicely but proceeded to ignore my makefile for the shared library and therefore ultimately failed.

Attempt 2:
# -*- makefile -*-
%:
dh $@ --with-python2

This try ran make, but completely ignored the python stuff. From some research I have gathered that the --buildsystem flag tells debuild to ignore any makefiles in the directory, which obviously causes a problem in my case.

Another attempt was to modify the build dependency to first run make and then call the python build process that file looked like this

Attempt 3:
# -*- makefile -*-

build:
dh $@
dh $@ --with-python2 --buildsystem=python_distutils
%:
dh $@ --with-python2 --buildsystem=python_distutils

This appears to somewhat work as both processes do build, but a few of the python files are still not getting installed.

Is this the way I should be going about doing this? I've noticed that most python wrappers tend to package themselves individually and then make that package dependent on the library it is attempting to wrap.

View 0 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved