community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!

Connecting to Git scripts

Atom

Hello there!

 

I'm a beginner in Alteryx so still figuring out the basics. I wanted to know is it possible to connect to Git using input tool or any other tool to run a script in there?

 

I spent some time online, trying to get some insight on this  - but without luck, so your help would be much appreciated.

 

Thank you and good day!

 

Lisa

 

 

 

Alteryx
Alteryx

@_Lisa_ Yes this is possible via the Python tool.

 

from ayx import Alteryx
Alteryx.installPackages(package="git+https://github.com/facebookresearch/pysparnn.git")

I would check out this post as well - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Python-Tool-How-to-install-additional-...

 

Digan
Alteryx
Atom

Thanks for responding @DiganP 

 

I tried to install that package using the python tool but am getting the following "CalledProcessError" error. I checked online and found that I need to run Alteryx as an admin - did that but still getting the error.

Collecting git+<a href="https://github.com/facebookresearch/pysparnn.git" target="_blank">https://github.com/facebookresearch/pysparnn.git</a>
  Cloning <a href="https://github.com/facebookresearch/pysparnn.git" target="_blank">https://github.com/facebookresearch/pysparnn.git</a> to c:\users\e069285\appdata\local\temp\pip-13s6wki0-build
  Error [WinError 2] The system cannot find the file specified while executing command git clone -q <a href="https://github.com/facebookresearch/pysparnn.git" target="_blank">https://github.com/facebookresearch/pysparnn.git</a> C:\Users\e069285\AppData\Local\Temp\pip-13s6wki0-build
Cannot find command 'git'
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-1-5577088ecadd> in <module>
      1 from ayx import Alteryx
----> 2 Alteryx.installPackages(package="git+<a href="https://github.com/facebookresearch/pysparnn.git" target="_blank">https://github.com/facebookresearch/pysparnn.git</a>")

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\export.py in installPackage(package, install_type, debug, **kwargs)
    138     This function will install a package or list of packages into the virtual environment used by the Python tool. If using an admin installation of Alteryx, you must run Alteryx as administrator in order to use this function and install packages.
    139     """
--> 140     __installPackages__(package, install_type=install_type, debug=debug, **kwargs)
    141 
    142 

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\Package.py in installPackages(package, install_type, debug)
    112     print(pip_install_result['msg'])
    113     if not pip_install_result['success']:
--> 114         raise pip_install_result['err']

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\Utils.py in runSubprocess(args_list, debug)
     48 
     49     try:
---> 50         result = subprocess.check_output(args_list, stderr=subprocess.STDOUT)
     51         if debug:
     52             print("[Subprocess success!]")

C:\Program Files\Alteryx\bin\Miniconda3\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
    334 
    335     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 336                **kwargs).stdout
    337 
    338 

C:\Program Files\Alteryx\bin\Miniconda3\lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
    416         if check and retcode:
    417             raise CalledProcessError(retcode, process.args,
--> 418                                      output=stdout, stderr=stderr)
    419     return CompletedProcess(process.args, retcode, stdout, stderr)
    420 

CalledProcessError: Command '['c:\\program files\\alteryx\\bin\\miniconda3\\pythontool_venv\\scripts\\python.exe', '-m', 'pip', 'install', 'git+<a href="https://github.com/facebookresearch/pysparnn.git" target="_blank">https://github.com/facebookresearch/pysparnn.git</a>']' returned non-zero exit status 1.

 

 

Any thoughts on this?

 

Thank again!

 

 

Labels