Skip to content

Can't find python exe file #43

@braunman

Description

@braunman

Hi,
I try to run plugin withPythonEnv on windows server with code:

      stage('Creat VENV') {
         steps {
            bat '''python -m venv venv
            '''

         }
        }
        stage('Build') {
         steps {
         
            withPythonEnv('venv\\Scripts\\python.exe'){
                bat '''pip install -r requirements.txt
                pip list
                pyinstaller --onefile bo_installer.py
                '''
            }
            
        }

but when start execute step Build Jenkins fails with error

[Pipeline] withPythonEnv
$ venv\Scripts\python.exe --version
[Pipeline] // withPythonEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: CreateProcess error=2, can't find file
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ci3/10.50.1.53:55834

step 'Creat VENV' finish without any error. And I clearly knew that file python.exe exist in folder.

Jenkins ver. 2.204.1
Pyenv Pipeline Plugin ver 2.1.2

Have you any suggestion why it's fails?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions