472,992 Members | 3,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

importing modules

I could not import modules like os,glob and other standard modules in python..
The only module i can import is sys...

import site' failed; use -v for traceback
is the error code i get if i open the editor...


>>>import os
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named os\
>>>


what should i include do to get my modules import?
Sep 19 '07 #1
4 1423
aruni
4
check weather u installed it correctly
Sep 19 '07 #2
bartonc
6,596 Expert 4TB
I could not import modules like os,glob and other standard modules in python..
The only module i can import is sys...

import site' failed; use -v for traceback
is the error code i get if i open the editor...


>>>import os
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named os\
>>>


what should i include do to get my modules import?
Your installation does seem a bit odd... "use -v for traceback": The verbose option is normally set in off the shelf versions. So:
Did you compile this sub-version?
What's your OS, etc.
If you didn't do the compile, where'd you get the version of python and what is that version?
Etc, etc???
Sep 19 '07 #3
Your installation does seem a bit odd... "use -v for traceback": The verbose option is normally set in off the shelf versions. So:
Did you compile this sub-version?
What's your OS, etc.
If you didn't do the compile, where'd you get the version of python and what is that version?
Etc, etc???

My python version is 2.5.1
My OS is Windows XP
How to set the verbose option to ON?
Sep 20 '07 #4
bartonc
6,596 Expert 4TB
My python version is 2.5.1
My OS is Windows XP
How to set the verbose option to ON?
This indicates that you have a bad installation. You must re-install.
Be sure to include all optional packages.
Use the
Python 2.5.1 Windows installer
(Windows binary -- does not include source)
from the Download Standard Python Software page.

That should solve all of your problems at one time.
Sep 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Vsevolod (Simon) Ilyushchenko | last post by:
Hi, Last year I have written a Perl module to serve as a backend to Macromedia Flash applications: http://www.simonf.com/amfperl I have just rewritten it in Python, which I have not used...
12
by: qwweeeit | last post by:
The pythonic way of programming requires, as far as I know, to spread a big application in plenty of more manageable scripts, using import or from ... import to connect the various modules. In...
0
by: Brandon Metcalf | last post by:
I come from a Perl and C background and have been given an application written in Python to maintain and I know very little about Python. I'm having trouble at run time with importing modules. ...
6
by: Kamilche | last post by:
I have a large project that is getting complex, and I would like to print the docstrings without importing the modules. The only Python utility I could find references is apparently defunct and...
6
by: Walter Brunswick | last post by:
What is the best way to import all modules in a directory (and possibly a subdirectory/subdirectories), possibly including conditionals, such as regexes?
0
by: Jure Vrscaj | last post by:
Hi, as title implies, I wrote a simple module that allows importing modules or even packages via http, conceptually similar to zipimport (of which I learned about during the process of writing...
14
by: T. Crane | last post by:
Hi, When troubleshooting code that's saved in a text file, I often find that I want to make a change to it, re-save it, then reimport it. However, just typing import myTestCode doesn't...
0
by: Martin P. Hellwig | last post by:
Hello all, I had some troubles in the past how to arrange my packages and modules, because I usually don't develop my stuff in the Lib\site-packages directory I have some troubles when importing...
0
by: Marcin Krol | last post by:
Hello everyone, I can embed Python interpreter in C code now, but now there's another problem, importing modules in Python code doesn't work: Exception exceptions.ImportError:...
7
by: Hussein B | last post by:
Hey, Suppose I have a Python application consists of many modules (lets say it is a Django application). If all the modules files are importing sys module, how many times the sys module will be...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.