Questions tagged [environment]

The O/S in which a process is executed, especially settings that affect the process

A computing environment consists of the following items:

  • Server hardware
  • Operating system
  • Software (both the software being used, and supporting software, such as and )
  • Data (input/output) from the software
  • Environment settings, such as executable PATH search directories

Commonly, for software development there are three main groups of environments:

2804 questions
58
votes
5 answers

Setting environment variable for one program call in bash using env

I am trying to invoke a shell command with a modified environment via the command env. According to the manual env HELLO='Hello World' echo $HELLO should echo Hello World, but it doesn't. If I do HELLO='Hello World' bash -c 'echo $HELLO' it prints…
Niklas
  • 1,280
  • 1
  • 10
  • 14
55
votes
1 answer

Does bash have a way to un-export a variable without unsetting it?

Is it possible to export a variable in Bash, then later un-export it, without unsetting it entirely? I.e. have it still available to the current shell, but not to sub-processes. You can always do this, but it's ugly (and I'm curious): export…
Brendan
  • 1,995
  • 1
  • 20
  • 35
55
votes
5 answers

How to use environment variable in a C program

I need to know a way for use environment variables in the C programming language. How can I use and read them? For example, read an environment variable or take the value of an environment variable and load it in another variable.
Alex
  • 559
  • 1
  • 4
  • 6
54
votes
1 answer

Anaconda: Install specific packages from specific channels using environment.yml

does anyone know how to construct an Anaconda environment.yml file so that it installs specific packages from specific channels? Something like this: dependencies: - numpy - pandas - package-A from channel Z - package-B from channel Y All I…
Alex
  • 795
  • 1
  • 7
  • 11
52
votes
8 answers

Does php have an equivalent to python's virtualenv or ruby's sandbox?

I'm used to using python's virtualenv tool to create separate environments that can mimic deployment environments for projects I write. Now, I'm going to be working on a php project and I'm wondering if there's any equivalent to that? Specifically…
Zxaos
  • 7,791
  • 12
  • 47
  • 61
49
votes
4 answers

How to set active spring 3.1 environment profile via a properites file and not via an env variable or system property

We use the new environment profiles feature of spring 3.1. We currently set the active profile by setting the environment variable spring.profiles.active=xxxxx on the server to which we deploy the application. We think this is a suboptimal solution…
Fabian
  • 2,428
  • 2
  • 21
  • 19
47
votes
3 answers

Conda: Creating a virtual environment

I'm trying to create a virtual environment. I've followed steps from both Conda and Medium. Everything works fine until I need to source the new environment: conda info -e # conda environments: # base * …
Forrest
  • 548
  • 1
  • 4
  • 10
46
votes
10 answers

Environment driven database settings in Laravel?

I am moving over the the Laravel framework, but I am having trouble with the database settings, Specifically, I have my environments setup, and they are working fine for the application.php config file, however the database.php config file seems to…
Hailwood
  • 89,623
  • 107
  • 270
  • 423
44
votes
14 answers

Windows 7 environment variable not working in path

I am trying to set up some path using environment variable. I added an environment variable "MAVEN_HOME" with the value "C:\maven". Then in the path I added "%MAVEN_HOME%\bin;...rest". When I type "echo $MAVEN_HOME%" I get the correct "C:\maven"…
jiminssy
  • 2,149
  • 6
  • 28
  • 45
44
votes
15 answers

Visual Studio Code terminal doesn't activate Conda environment

I read this Stack Overflow post on a similar issue, but the suggestions there don't seem to be working. I installed Visual Studio Code on my Windows machine and added the Python extension. Then I changed the Python path for my project to…
44
votes
1 answer

remove Anaconda environment with no name?

I was trying to create an Anaconda environment from Pycharm, but while I was experimenting different paths, one of the environments was created with no name. like the following: base * /Applications/anaconda3 snowflaks …
Amber G
  • 441
  • 1
  • 4
  • 3
44
votes
7 answers

How to test HQL queries?

I'm searching for a fast (really fast) way to test changes to hibernate queries. I have a huge application with thousands of different HQL queries (in XML files) and 100+ mapped classes and i dont want to redeploy the whole application to just test…
Chris
  • 15,429
  • 19
  • 72
  • 74
43
votes
7 answers

How can I detect Heroku's environment?

I have a Django webapp, and I'd like to check if it's running on the Heroku stack (for conditional enabling of debugging, etc.) Is there any simple way to do this? An environment variable, perhaps? I know I can probably also do it the other way…
aviraldg
  • 9,531
  • 6
  • 41
  • 56
43
votes
12 answers

Setting up Eclipse with JRE Path

I have downloaded and extracted Eclipse. I have Eclipse in the following directory: C:\Applications\eclipse. When I try and run the executable , I get the following message : I currently have the following folder: C:\Program Files…
user2351151
  • 725
  • 4
  • 12
  • 16
42
votes
11 answers

Create conda environment: "Found conflicts!" when solving environment and "Finding shortest conflict path" running forever

I was provided with an environment.ubuntu.yml file to be able to create a conda environment. However, running conda create env --file environment.ubuntu.yml I get the following output: conda env create --file environment.ubuntu.yml Collecting…
Toivo Säwén
  • 1,905
  • 2
  • 17
  • 33