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
#5
You are right. It calls the wrong python, how is this possible?

(base) PS C:\Users\vincenzo\Desktop> python
Python 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print('\n'.join(sys.path))

C:\Users\vincenzo\Miniconda3\python37.zip
C:\Users\vincenzo\Miniconda3\DLLs
C:\Users\vincenzo\Miniconda3\lib
C:\Users\vincenzo\Miniconda3
C:\Users\vincenzo\Miniconda3\lib\site-packages
C:\Users\vincenzo\Miniconda3\lib\site-packages\win32
C:\Users\vincenzo\Miniconda3\lib\site-packages\win32\lib
C:\Users\vincenzo\Miniconda3\lib\site-packages\Pythonwin
>>>
>>> ^Z

(base) PS C:\Users\vincenzo\Desktop> wrapp
C:\Users\vincenzo\Cloud\Hobby\Programmi\bin
C:\Users\vincenzo\.platformio\python27\python27.zip
C:\Users\vincenzo\.platformio\python27\DLLs
C:\Users\vincenzo\.platformio\python27\lib
C:\Users\vincenzo\.platformio\python27\lib\plat-win
C:\Users\vincenzo\.platformio\python27\lib\lib-tk
C:\Users\vincenzo\.platformio\python27
C:\Users\vincenzo\.platformio\python27\lib\site-packages
As you can see in the first post I made the association to link .py script to python3
I copy here again the output:
Output:
C:\Users\vincenzo>ftype Python Python="C:\Users\vincenzo\Miniconda3\python.exe" "%1" %*
And the path is correct:
Output:
C:\Users\vincenzo>C:\Users\vincenzo\Miniconda3\python.exe Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 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 Type "help", "copyright", "credits" or "license" for more information. >>> import pyperclip >>> >>>
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 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 937 Mar-11-2024, 11:02 AM
Last Post: snippsat
Question Running Python script through Task Scheduler? Winfried 8 951 Mar-10-2024, 07:24 PM
Last Post: Winfried
  Triggering a ps1 script in remote windows server via http python request jasveerjassi 1 489 Jan-26-2024, 07:02 PM
Last Post: deanhystad
  Help Running Python Script in Mac OS emojistickers 0 420 Nov-20-2023, 01:58 PM
Last Post: emojistickers
  Trying to make a board with turtle, nothing happens when running script Quascia 3 824 Nov-01-2023, 03:11 PM
Last Post: deanhystad
  Python script running under windows over nssm.exe JaroslavZ 0 813 May-12-2023, 09:22 AM
Last Post: JaroslavZ
  Running script with subprocess in another directory paul18fr 1 4,420 Jan-20-2023, 02:33 PM
Last Post: paul18fr
  How to compile a Python script for a Windows / Linux executable? netanelst 2 1,428 May-24-2022, 07:02 AM
Last Post: netanelst
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 1,916 Feb-18-2022, 01:29 PM
Last Post: pstein
  batch file for running python scipt in Windows shell MaartenRo 2 2,067 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