Python Forum
Add file to sys.path permanently
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add file to sys.path permanently
#1
I'm running Python 3.7.3 and trying to add a library to sys.path. I can add it but it doesn't stick after next reload. I edited ~/.bashrc with the following:
PYTHONPATH="${PYTHONPATH}:/home/pi/Code"
export PYTHONPATH
PYTHONPATH now contains just '/home/pi/Code'. I have added an empty file '__site__.py' to the library. Is there something missing?
Reply


Messages In This Thread
Add file to sys.path permanently - by hcccs - Jan-30-2021, 08:18 PM
RE: Add file to sys.path permanently - by hcccs - Jan-31-2021, 11:07 AM
RE: Add file to sys.path permanently - by hcccs - Jan-31-2021, 11:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  save values permanently in python (perhaps not in a text file)? flash77 8 1,120 Jul-07-2023, 05:44 PM
Last Post: flash77
  File path by adding various variables Mishal0488 2 964 Apr-28-2023, 07:17 PM
Last Post: deanhystad
  Script File Failure-Path Error? jerryf 13 3,314 Nov-30-2022, 09:58 AM
Last Post: jerryf
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,149 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  Subprocess.Popen() not working when reading file path from csv file herwin 13 14,619 May-07-2021, 03:26 PM
Last Post: herwin
  PyDrive download file path MiniMinnow 0 3,210 Apr-28-2020, 03:01 PM
Last Post: MiniMinnow
  String to File Path creedX 4 3,213 Apr-06-2020, 07:29 PM
Last Post: creedX
  Add path to a local file in pop-up field pythonscripting 1 1,621 Feb-08-2020, 10:57 PM
Last Post: Larz60+
  How to get file name without the full path details and without extension aruncom2006 1 5,850 Jan-13-2020, 07:37 AM
Last Post: Larz60+
  How to include Variable in File Path penahuse 3 7,219 Jan-05-2020, 03:08 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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