LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-30-2008, 01:47 PM   #1
leroy27336
Member
 
Registered: Nov 2003
Distribution: LTS Ubuntu 6.06
Posts: 127

Rep: Reputation: 15
pymills install


I am trying to install the pymills-3.4 module. The tarball comes packed with a setup.py script. The script is as follows:

#!/usr/bin/env python

import os
import re

name = os.path.basename(os.getcwd())
pkg = __import__(name)

try:
import ez_setup
ez_setup.use_setuptools()
print "Using ez_setup"
except ImportError:
pass

try:
from setuptools import setup, find_packages
print "Using setuptools"
except ImportError:
print "Using distutils"
from distutils.core import setup

# borrowed from pymills.utils
def getFiles(paths, tests=[os.path.isfile], pattern=".*", \
include_path=True):
"""getFiles(path, tests=[os.path.isfile], pattern=".*", \
include_path=True) -> list of files

Return a list of files in the specified path
applying the predicates listed in tests returning
only the files that match the pattern.
"""

def testFile(file):
for test in tests:
if not test(file):
return False
return True

list = []
for path in paths:
if not os.path.exists(path):
continue
files = os.listdir(path)
for file in files:
if testFile(os.path.join(path, file)) and \
re.match(pattern, file):
if include_path:
list.append(os.path.join(path, file))
else:
list.append(file)
return list

def main():
setup(
name=name,
version=pkg.__version__,
description=pkg.__description__,
long_description=pkg.__doc__,
author=pkg.__author__,
author_email=pkg.__author_email__,
maintainer=pkg.__maintainer__,
maintainer_email=pkg.__maintainer_email__,
url=pkg.__url__,
download_url=pkg.__download_url__,
classifiers=pkg.__classifiers__,
license=pkg.__license__,
keywords=pkg.__keywords__,
platforms=pkg.__platforms__,
packages=find_packages(),
scripts=getFiles(["scripts"]),
install_requires=pkg.__install_requires__,
setup_requires=pkg.__setup_requires__,
extras_require=pkg.__extras_require__,
entry_points=pkg.__entry_points__,
package_data=pkg.__package_data__,
)

if __name__ == "__main__":
main()


Everytime I try to run the script, I receive the following error message:

Traceback (most recent call last):
File "setup.py", line 7, in <module>
pkg = __import__(name)
ImportError: No module named pymills-3.4


I don't understand what I need to know. Obviously there isn't going to be a module named pymills, because that is what I am trying to install.

Any help is appreciated.
 
Old 06-02-2008, 05:46 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
What commands did you run to install it? Have you tried
Code:
python setup.py --install
or
Code:
python setup.py install
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat Linux 9 install: error "No devices found to install ... gunneszz Red Hat 1 03-10-2008 04:52 AM
apt-get install dependency problems with hplip software and kde install for Agnula maybi7 Linux - Software 1 02-03-2007 05:16 PM
SuSE 9 Install Freezes when swapping CDs during VMWare based Install barkout SUSE / openSUSE 2 02-09-2006 07:36 AM
How do I re-install an operatingsystem? Corrupted install. Yast wont load. URGENT.thx CrewXp SUSE / openSUSE 5 05-09-2005 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration