Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install pip packages on Windows due to pip.version not accepting cwd= #52761

Open
Sxderp opened this issue Apr 30, 2019 · 4 comments
Open
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE doc-rework confusing, misleading, or wrong severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
Milestone

Comments

@Sxderp
Copy link

Sxderp commented Apr 30, 2019

Description of Issue/Question

Windows cannot find the pip executable in order to determine the version of pip that is running. This is done in pip.install and probably other places too. If I manually add cwd='C:\\salt\\bin\\Scripts' to the cmd.run_all then everything works fine.

Setup

# install_schedule.sls
croniter-pip:
  pip.installed:
    - name: croniter
    - cwd: 'C:\salt\bin\Scripts'
    - bin_env: 'C:\salt\bin\Scripts\pip.exe'

windows-highstate:
  schedule.present:
    - function: state.highstate
    - job_kwargs:
        saltenv: math
        pillarenv: math
    - cron: '0 2 * * *'
    - splay: 10800
    - require:
      - croniter-pip

Steps to Reproduce Issue

salt-call state.highstate

          ID: croniter-pip
    Function: pip.installed
        Name: croniter
      Result: None
     Comment: Error installing 'croniter': Could not find a `pip` binary
     Started: 08:39:24.842996
    Duration: 19.915 ms
     Changes:   

(Include debug logs if possible and relevant.)

Versions Report

           Salt: 2018.3.3

Dependency Versions:
           cffi: 1.10.0
       cherrypy: 10.2.1
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: 2.0.5
      gitpython: 2.1.3
          ioflo: Not Installed
         Jinja2: 2.9.6
        libgit2: Not Installed
        libnacl: 1.6.1
       M2Crypto: Not Installed
           Mako: 1.0.6
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: 2.17
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)]
   python-gnupg: 0.4.1
         PyYAML: 3.12
          PyZMQ: 16.0.3
           RAET: Not Installed
          smmap: 2.0.5
        timelib: 0.2.4
        Tornado: 4.5.1
            ZMQ: 4.1.6

System Versions:
           dist:
         locale: cp1252
        machine: AMD64
        release: 10
         system: Windows
        version: 10 10.0.17763 SP0 Multiprocessor Free
@waynew waynew added Bug broken, incorrect, or confusing behavior P3 Priority 3 Windows labels Apr 30, 2019
@waynew waynew added this to the Approved milestone Apr 30, 2019
@twangboy
Copy link
Contributor

If you're working with salt's python installation, as it seems you are, you shouldn't need to specify cwd and bin_env anymore.

@Sxderp
Copy link
Author

Sxderp commented May 1, 2019

I was able to successfully install the python module with the following sls. As suggested by @twangboy I removed the cwd and bin_env.

# install_schedule.sls
croniter-pip:
  pip.installed:
    - name: croniter

...

While my particular use case has been resolved, I still think the original issue is valid and therefore I'm not going to close the report. However, a documentation update may be required since it currently recommends including cwd and bin_env.

@twangboy twangboy self-assigned this May 17, 2019
@stale
Copy link

stale bot commented Jan 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 7, 2020
@waynew waynew added the Confirmed Salt engineer has confirmed bug/feature - often including a MCVE label Jan 8, 2020
@stale
Copy link

stale bot commented Jan 8, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Jan 8, 2020
@sagetherage sagetherage removed the P3 Priority 3 label Jun 3, 2020
@sagetherage sagetherage added this to To do in Windows via automation May 21, 2021
@sagetherage sagetherage added the doc-rework confusing, misleading, or wrong label May 21, 2021
@sagetherage sagetherage added the severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around label May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE doc-rework confusing, misleading, or wrong severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
Windows
  
To do
Development

No branches or pull requests

5 participants