Sikulix 2.0.5 I want use requests (HTTP for Humans)

Asked by Hiroshi Aoyagi

Hi

Sikulix 2.0.5 I want use requests (HTTP for Humans)

Like PIP in Python

Please tell me how to add the extension

Sikulix 2.0.5
Windows10 Pro
c:\Sikulix\
  sikulixide-2.0.5.jar

C:\Users\[USERNAME]\AppData\Roaming\Sikulix
  Extensions Empty
  Lib Any module
  SikulixDownloads Empty
  SikulixStore Empty

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Python modules can only be used if they are written in Python language only (max level 2.7) and do not contain or reference any native libraries.

Install the module with Python/pip and add a reference to the folder containing the module into Sikulix's Lib folder in site-packages/sites.txt. Restart the IDE and try to import.

If you get any errors after the import, then the module is not useable.

Revision history for this message
Hiroshi Aoyagi (hirobluez) said :
#2

Hi

Now it is like this.

sites_example.txt
in C:\Users\[user]\AppData\Roaming\Sikulix\Lib\site-packages

  # rename/copy this file as sites.txt and it will be seen by SikuliX
  #
  # add absolute paths one per line, that point to other directories/jars,
  # where importable modules (Jython, plain Python, SikuliX scripts, ...) can be found.
  # They will be added automatically at startup to the end of sys.path in the given sequence
  #
  # lines beginning with # or // are ignored and can be used as comments

Please show with a specific example.
I want add
  Jython Lib Folder is
    C:\temp\jython2.7.3\Lib
and
  Anaconda2 Lib Folder is
    C:\temp\Anaconda2\Lib

Thank you.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

with
for e in sys.path: print e

you can show the current content of sys.path.

You should see, that Jython/Lib is already there (when using SikulixIDE).

in sites.txt have line
C:\temp\Anaconda2\Lib

to add it to sys.path.

After changing sites.txt you have to restart the IDE.

Revision history for this message
RaiMan (raimund-hocke) said :
#6

no feedback