Python Forum
Python environment variables
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python environment variables
#1
Please can someone advise me.
I am using python on a linux box and have tried setting environment variables such as PYTHONSTARTUP in my .bashrc file but they seem to be ignored when I start a python shell.
The command I am using is :-
export PYTHONSTARTUP=/home/pi/Documents/PythonProjects/ini.py

The path exists and the ini.py file contains legal python.

Thank you
Dave Nuttall
Reply
#2
Did you source the .bashrc file after saving it?
Reply
#3
Hi Thank you for your help.
All now seems to be well.
Best regards
Dave
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing python packages in a virtual environment Led_Zeppelin 1 712 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Understanding venv; How do I ensure my python script uses the environment every time? Calab 1 2,158 May-10-2023, 02:13 PM
Last Post: Calab
  Python development environment standenman 3 1,523 May-04-2023, 07:24 PM
Last Post: snippsat
  Python Scripting Environment jpotter0 1 1,619 Nov-19-2022, 03:07 PM
Last Post: snippsat
  How do I link the virtual environment of that project to the 3.9.2 version of python? Bryant11 1 1,332 Feb-26-2022, 11:15 AM
Last Post: Larz60+
  VS Code debugger using wrong Python environment topfox 0 2,428 Jun-09-2021, 10:01 AM
Last Post: topfox
  Virtual environment and upgrading python 3.5 to 3.9 NeilUK 4 11,978 Jan-24-2021, 01:02 PM
Last Post: snippsat
  Installing keras in Python 2.7 environment ErnestTBass 3 5,359 Nov-01-2020, 08:36 PM
Last Post: jefsummers
  Python in Linux environment on RPI kendias 22 10,909 Sep-05-2020, 03:04 AM
Last Post: K_Research
  Unable to install virtual environment on python 3.8.3 Allen10 4 3,047 Jun-04-2020, 04:22 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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