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.jayachand...@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
>

Reply via email to