Python Forum
could you please help how to run this file on command prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
could you please help how to run this file on command prompt
#1
code is as shown below, saved as ynb.py

def get_cube_root(num):
	return num ** (1. / 3)
i tried to run in command prompt

Error:
C:\Users\s\Documents>python -c get_cube_root(27) ImportError: No module named site C:\Users\s\Documents>python -c 'from footbar import *; print get_cube_root(27) ImportError: No module named site C:\Users\s\Documents>python ynb.py ImportError: No module named site C:\Users\s\Documents>ynb.py C:\Users\s\Documents>python ynb.py ImportError: No module named site C:\Users\s\Documents>print ynb.by Unable to initialize device PRN
any suggestion
Reply


Messages In This Thread
could you please help how to run this file on command prompt - by m123 - Mar-24-2018, 12:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu BillKochman 13 1,060 Apr-24-2024, 05:47 AM
Last Post: Bronjer
  What is the difference between Command Prompt and Sublimes yaoyao22 1 667 Jul-09-2023, 02:56 PM
Last Post: snippsat
  Facing Problem while opening a file through command prompt vlearner 4 1,962 Jan-30-2022, 08:10 AM
Last Post: snippsat
  Dynamic File Name to a shared folder with open command in python sjcsvatt 9 6,129 Jan-07-2022, 04:55 PM
Last Post: bowlofred
  Noob warning: trying to use pip to install pytest and pep8 in Command Prompt adifrank 4 5,382 Dec-20-2020, 04:23 AM
Last Post: adifrank
  Running Python in Command Prompt Anwar 3 3,122 Nov-15-2020, 03:15 PM
Last Post: snippsat
  starting python from windows command prompt MaartenRo 4 2,878 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  Will not print in command prompt PandaCode 12 13,239 May-06-2020, 03:48 AM
Last Post: PandaCode
  Script works when executed from command prompt but not when executed in SDP Tippex 0 2,026 Apr-07-2020, 04:26 PM
Last Post: Tippex
  can we write command output to new csv file using Panda package? PythonBeginner_2020 3 2,414 Mar-13-2020, 12:38 PM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020