Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for Changing PYTHONPATH in shell

Current License: CC BY-SA 3.0

25 events
when toggle format what by license comment
Oct 27, 2021 at 21:11 history reopened Navin
smac2020
q-l-p
Oct 21, 2021 at 17:16 review Reopen votes
Oct 27, 2021 at 21:11
Mar 10, 2013 at 20:39 vote accept user2152303
Mar 10, 2013 at 0:46 history closed bmargulies
CharlesB
Community Bot
eandersson
phs
too localized
Mar 9, 2013 at 23:16 answer added miikkas timeline score: 8
Mar 9, 2013 at 22:06 comment added user2152303 Thanks! So is sys.path equivalent to PYTHONPATH? If so, then I directly modify sys.path[0] and set it equal to my current directory with all the scripts?
Mar 9, 2013 at 21:15 review Close votes
Mar 10, 2013 at 0:46
S Mar 9, 2013 at 21:02 history edited Morgan CC BY-SA 3.0
Indentation easier on the eyes
S Mar 9, 2013 at 21:02 history suggested Balthazar Rouberol CC BY-SA 3.0
Indentation easier on the eyes
Mar 9, 2013 at 21:01 comment added Balthazar Rouberol Note that sys.path is not a file, but "list of strings that specifies the search path for modules. Initialized from the environment variable PYTHONPATH, plus an installation-dependent default." (from docs.python.org/2/library/sys.html?highlight=sys.path#sys.path). I hope that helps clarifying some things :)
Mar 9, 2013 at 20:55 review Suggested edits
Mar 9, 2013 at 21:02
Mar 9, 2013 at 20:52 comment added user2152303 OK, sorry - on there now!
Mar 9, 2013 at 20:52 history edited user2152303 CC BY-SA 3.0
Add full output
Mar 9, 2013 at 20:42 comment added Croad Langshan Edit your answer to include the full output, don't paste it in a comment because that is hard to read.
Mar 9, 2013 at 20:34 comment added user2152303 Apalala, thanks! How do I do that in the shell here? Sorry for being so clueless!
Mar 9, 2013 at 20:33 comment added user2152303 Hi Croad, that's the entire output, copied from my shell: Traceback (most recent call last): File "[file]", line 7, in <module> import [file] File "[directory]/file", line 22, in <module> import gdata.spreadsheet.service ImportError: No module named gdata.spreadsheet.service and then it goes back to the shell prompt. Thanks!
Mar 9, 2013 at 20:30 comment added Croad Langshan user2152303: your last comment is self-contradictory. The important information that I suspect is missing is the final line of the traceback, which says what the exception type and exception detail was.
Mar 9, 2013 at 20:30 review First posts
Mar 9, 2013 at 20:30
Mar 9, 2013 at 20:28 comment added Apalala You could modify Python's sys.path instead of fighting with an unknown shell.
Mar 9, 2013 at 20:24 comment added user2152303 And Croad, that's the full output of the program - it spits out "Traceback: most recent last call:" followed by the errors I pasted on there. Thanks!
Mar 9, 2013 at 20:23 comment added user2152303 Eric, I'm running CygWin to ssh into a cluster on my university's servers - is there a way to find out which shell from there?
Mar 9, 2013 at 20:20 history edited user2152303 CC BY-SA 3.0
Forgot to mention one more thing tried
Mar 9, 2013 at 20:18 comment added Croad Langshan That doesn't look like the full output of the program.
Mar 9, 2013 at 20:18 comment added Eric Urban What shell are you using? The syntax to set variables is different in each shell. PYTHONPATH is normally undefined.
Mar 9, 2013 at 20:11 history asked user2152303 CC BY-SA 3.0
toggle format

AltStyle によって変換されたページ (->オリジナル) /