473,406 Members | 2,620 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,406 software developers and data experts.

Setting a path

Hi everyone,
Im new to python and im trying to make sure my path is set correctly. I completed a program and save it but cant seem to make it run in cmd, it keep saying that it cannot find file or directory. Please help
Jun 20 '07 #1
3 1327
r035198x
13,262 8TB
Hi everyone,
Im new to python and im trying to make sure my path is set correctly. I completed a program and save it but cant seem to make it run in cmd, it keep saying that it cannot find file or directory. Please help
Give details of the command that you're typing. Have configured python correctly and added it to your path?
Jun 21 '07 #2
bartonc
6,596 Expert 4TB
Hi everyone,
Im new to python and im trying to make sure my path is set correctly. I completed a program and save it but cant seem to make it run in cmd, it keep saying that it cannot find file or directory. Please help
In Windows, if you need to add the Python directory to your PATH environment variable, right click My Computer, pull down to Properties. On the Advanced tab click Environment variables. If there is a PATH variable there, select it and click edit, otherwise click new and name the new variable "PATH". INSERT something like "C:\python24;" (what ever is right for your system) at the beginning of the semicolon-separated list. Click OK and dismiss all the dialog boxes. At the command-line (cmd), you must either cd (change directory) to the folder where you .py file is located or type in the complete path. ie
C:\Python Scripts>python myPythonScript.py.

Hope that helps.
Jun 21 '07 #3
bartonc
6,596 Expert 4TB
In Windows, if you need to add the Python directory to your PATH environment variable, right click My Computer, pull down to Properties. On the Advanced tab click Environment variables. If there is a PATH variable there, select it and click edit, otherwise click new and name the new variable "PATH". INSERT something like "C:\python24;" (what ever is right for your system) at the beginning of the semicolon-separated list. Click OK and dismiss all the dialog boxes. At the command-line (cmd), you must either cd (change directory) to the folder where you .py file is located or type in the complete path. ie
C:\Python Scripts>python myPythonScript.py.

Hope that helps.
That said, there are much easier ways to run your script. One example: Python comes with a workable IDE called IDLE that lets you edit you .py files and run them from the menu.
Jun 21 '07 #4

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

Similar topics

0
by: Prawdziwa Blondynka | last post by:
Hi, I would like to do the following with C++ and Xerces: set the schema path in an XML file to parse in this way: XMLCh* schemaLocation = XMLString::transcode(namespaceAndPath);...
3
by: Steve Yerkes | last post by:
There seems to be way too much confusion over how to set focus on the a field using a field validator. I looked all over the web and found people trying to do this, but not getting anywhere. There...
11
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some...
2
by: Ralph | last post by:
Hi, I've done a bit of reading on setting up an Isolated .NET environment for each of my developers. We all run Windows XP Pro, IIS and have local instances of SQL Server for development. I...
3
by: Patrick | last post by:
I am dynamically creating TextArea and drop-down lists in ASP.NET using something like HtmlTextArea eachTextArea = new HtmlTextArea(); I tried to set the "name" of these TextAreas, etc. (e.g....
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
0
by: Johan | last post by:
Hi I'm using WMI to set and remove folderpermissions and it sems to work fine, sometimes. I start by having the folderpermissons manuly set to Everyone and Everone has full rights. When I'm...
1
by: phil campaigne | last post by:
On Mon, 1 Mar 2004, phil campaigne wrote: >> Nigel J. Andrews wrote: >> > > >>> >On Mon, 1 Mar 2004, Phil Campaigne wrote: >>> > >>> >
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
2
by: bart.hernalsteen | last post by:
Hi, I want to read the envorinment setting "path" and then on certain conditions change this setting. ex path : "%SystemRoot%\system32;%SystemRoot%;%SystemRoot% \System32\Wbem;C:\Program...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.