Python Forum
running script from CLI in windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
running script from CLI in windows
#6
You are making this difficult when also bring Miniconda3 into this.
When using Anaconda/Miniconda (base) should be active(as you have),
then python and pip will always point to this (base) Virtual environment main installation C:\Users\vincenzo\Miniconda3.
Not using python it can/will break out and use other version.

The problem is also if not using python and mange to set ftype to Miniconda,
then (base) may not be active,and get trouble like this:
Error:
Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation
Maybe there is a solution,but i would keep simple as i have Miniconda and Anaconda installed.
When use them i have (base) active and use python and pip no direct call without.

There also FileTypesMan that make it easier to change this,
but the (base) Virtual environment can make this tricky not using python.

I have Python 3.7(Python.org) set as main version for python with and without.
I use cmder as i do not at all like Powershell/cmd.
E:\div_code
λ python ver1.py
C:\python37\python.exe

E:\div_code
λ ver1
C:\Python37\python.exe

E:\div_code
λ pip -V
pip 20.0.2 from c:\python37\lib\site-packages\pip (python 3.7)

E:\div_code
λ python -V
Python 3.7.3
ftype "C:\Python37\python.exe" "%1"
Reply


Messages In This Thread
running script from CLI in windows - by aster - Apr-05-2020, 11:47 PM
RE: running script from CLI in windows - by aster - Apr-07-2020, 02:23 PM
RE: running script from CLI in windows - by aster - Apr-07-2020, 05:06 PM
RE: running script from CLI in windows - by snippsat - Apr-07-2020, 05:55 PM
RE: running script from CLI in windows - by aster - Apr-08-2020, 07:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  No Internet connection when running a Python script basil_555 8 824 Mar-11-2024, 11:02 AM
Last Post: snippsat
Question Running Python script through Task Scheduler? Winfried 8 766 Mar-10-2024, 07:24 PM
Last Post: Winfried
  Triggering a ps1 script in remote windows server via http python request jasveerjassi 1 441 Jan-26-2024, 07:02 PM
Last Post: deanhystad
  Help Running Python Script in Mac OS emojistickers 0 399 Nov-20-2023, 01:58 PM
Last Post: emojistickers
  Trying to make a board with turtle, nothing happens when running script Quascia 3 767 Nov-01-2023, 03:11 PM
Last Post: deanhystad
  Python script running under windows over nssm.exe JaroslavZ 0 772 May-12-2023, 09:22 AM
Last Post: JaroslavZ
  Running script with subprocess in another directory paul18fr 1 4,186 Jan-20-2023, 02:33 PM
Last Post: paul18fr
  How to compile a Python script for a Windows / Linux executable? netanelst 2 1,394 May-24-2022, 07:02 AM
Last Post: netanelst
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 1,871 Feb-18-2022, 01:29 PM
Last Post: pstein
  batch file for running python scipt in Windows shell MaartenRo 2 1,995 Jan-21-2022, 02:36 PM
Last Post: MaartenRo

Forum Jump:

User Panel Messages

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