473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1432
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.