File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,4 +164,5 @@ config.py
164164* .xlsx
165165.env
166166playground.py
167- profile.html
167+ profile.html
168+ * .bak
Original file line number Diff line number Diff line change 1- name : vam
1+ name : datalib
22channels :
33 - conda-forge
44 - defaults
@@ -128,14 +128,11 @@ dependencies:
128128 - pip :
129129 - annotated-types==0.6.0
130130 - anyio==4.3.0
131- - data-bridges-client==1.0.0
132131 - h11==0.14.0
133132 - httpcore==1.0.4
134133 - httpx==0.27.0
135- - pd-to-mssql==0.2.1
136134 - pydantic==2.6.4
137135 - pydantic-core==2.16.3
138- - pyinstrument==4.6.2
139136 - sniffio==1.3.1
140137 - typing-extensions==4.10.0
141138 - urllib3==2.0.7
Original file line number Diff line number Diff line change 1+ @ echo OFF
2+ rem How to run a Python script in a given conda environment from a batch file.
3+
4+ rem It doesn't require:
5+ rem - conda to be in the PATH
6+ rem - cmd.exe to be initialized with conda init
7+
8+ rem Define here the path to your conda installation
9+ set CONDAPATH = E:\ProgramData\Anaconda3
10+ rem Define here the name of the environment
11+ set ENVNAME = datalib
12+
13+ rem The following command activates the base environment.
14+ rem call C:\ProgramData\Miniconda3\Scripts\activate.bat C:\ProgramData\Miniconda3
15+ if %ENVNAME% == base (set ENVPATH=%CONDAPATH% ) else (set ENVPATH=%CONDAPATH% \envs\%ENVNAME% )
16+
17+ rem Activate the conda environment
18+ rem Using call is required here, see: https://stackoverflow.com/questions/24678144/conda-environments-and-bat-files
19+ call %CONDAPATH% \Scripts\activate.bat %ENVPATH%
20+
21+ rem Run a python script in that environment
22+ python main.py
23+
24+ rem Deactivate the environment
25+ call conda deactivate
26+
27+ rem If conda is directly available from the command line then the following code works.
28+ rem call activate someenv
29+ rem python script.py
30+ rem conda deactivate
31+
32+ rem One could also use the conda run command
33+ rem conda run -n someenv python script.py
You can’t perform that action at this time.
0 commit comments