# Can't Import pylink in Psychopy Standalone

**URL:** <https://discourse.psychopy.org/t/cant-import-pylink-in-psychopy-standalone/22145>\
**Category:** Coding\
**Tags:** eyetracking, iohub, importing\
**Created:** [April 8, 2021, 3:25pm UTC](https://discourse.psychopy.org/t/cant-import-pylink-in-psychopy-standalone/22145 "2021-04-08T15:25:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![llr](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@llr](https://discourse.psychopy.org/u/llr)\
**Post date:** [April 8, 2021, 3:25pm UTC](https://discourse.psychopy.org/t/cant-import-pylink-in-psychopy-standalone/22145/1 "2021-04-08T15:25:15Z")

</div>

Hi all,

I’ve been trying to get the visualsearch\_eyetracker.psyexp demo working (in dummy mode as I don’t have access to our eyelink tracker at the moment), but I’m failing at the first hurdle of importing pylink.

I get this error when I try import pylink in the coder shell:

```auto
>>> import pylink
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "./ __init__.py", line 57, in <module>
ImportError: dlopen(/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/pylink/pylink_c.cpython-36m-darwin.so, 2): Library not loaded: @executable_path/../Frameworks/eyelink_core.framework/Versions/A/eyelink_core
  Referenced from: /Applications/PsychoPy.app/Contents/Resources/lib/python3.6/pylink/pylink_c.cpython-36m-darwin.so
  Reason: image not found

```

I’ve downloaded and installed the [EyeLink Developers Kit v1.11.1 (32 and 64 bit)](https://download.sr-support.com/displaysoftwarerelease/EyelinkDisplayAPI_1.11.1.mpkg.zip) and I’ve checked that eyelink\_core.framework is definitely within my Library/Frameworks directory but for some reason the library isn’t getting loaded.

This is a fresh install of PsychoPy Standalone v2021.1.2 running on macOS 10.14.6

Any help with this would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![sol](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sol/32/15018_2.png) [@sol](https://discourse.psychopy.org/u/sol)\
**Post date:** [April 12, 2021, 10:10am UTC](https://discourse.psychopy.org/t/cant-import-pylink-in-psychopy-standalone/22145/2 "2021-04-12T10:10:04Z")

</div>

Could you try running one of the python examples included with the EyeLink Developers Kit / pylink and see if that runs? If I recall, the first time you run the pylink libs on macOS it complains about the lib signing and you have to tell macOS to allow it to run anyhow. I wonder if that is what is blocking it for you.

---

<div class="post-metadata">

**Author:** ![llr](https://avatars.discourse-cdn.com/v4/letter/l/67e7ee/32.png) [@llr](https://discourse.psychopy.org/u/llr)\
**Post date:** [April 13, 2021, 11:10am UTC](https://discourse.psychopy.org/t/cant-import-pylink-in-psychopy-standalone/22145/3 "2021-04-13T11:10:31Z")

</div>

Hi Sol,

I’m afraid I get the same error when running the pylink example scripts in Psychopy standalone, and I don’t remember ever being asked for run permissions by macOS.

The good news is that I’ve been able to get iohub and pylink imported and working inside Spyder. Therefore, I’ve decided to code the experiment from scratch instead of using the builder, however I’m left scratching my head as to why I couldn’t get pylink to work in Psychopy standalone…

---

<div class="post-metadata">

**Author:** ![sol](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sol/32/15018_2.png) [@sol](https://discourse.psychopy.org/u/sol)\
**Post date:** [April 14, 2021, 9:30am UTC](https://discourse.psychopy.org/t/cant-import-pylink-in-psychopy-standalone/22145/4 "2021-04-14T09:30:42Z")

</div>

I wonder if a different version of pylink is being used in PsychoPy Builder vs. what you installed yourself. Do you mind checking what version of pylink you installed so we can see if it is different from what is included with PsychoPy?

```auto
import pylink
print(pylink. __version__ ) 

```

Thank you, and sorry for the inconvience.
