ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avia Efrat <a...@cloudify.co>
Subject Re: pip executable expected as part of plugin install.
Date Thu, 03 Aug 2017 10:30:34 GMT
Hi DJ,
It seems you are correct, I don't see a reason for not using the pip
library.
Maybe it was that way since we didn't want to add pip as a dependency
explicitly (this code is from the beginning of ARIA).

Feel free to open an issue about that =)

On Wed, Aug 2, 2017 at 10:19 AM, D Jayachandran <d.jayachandran@ericsson.com
> wrote:

> Hi,
>
> Am using a Ubuntu version of linux for my development and ARIA does not
> find the correct path of pip during the plugin install.
> To be precise this happens when pip freeze is executed.
>
>     @staticmethod
>     def _pip_freeze():
>         """Run pip freeze in current environment and return the output"""
>         bin_dir = 'Scripts' if os.name == 'nt' else 'bin'
>         pip_path = os.path.join(sys.prefix, bin_dir,
>                                 'pip{0}'.format('.exe' if os.name == 'nt'
> else ''))
>         pip_freeze = subprocess.Popen([pip_path, 'freeze'],
> stdout=subprocess.PIPE)
>         pip_freeze_output, _ = pip_freeze.communicate()
>         assert not pip_freeze.poll()
>         return pip_freeze_output
>
> Now the question is why are we executing a pip command directly and not
> using pip as a library.
>
>
> Regards,
> DJ
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message