Use the link, not the target
Answered
When I try to configure a SDK (python, ruby, java, ...) on IntelliJ, I try to use a link but the always use the target.
For example:
```
❯ ls -l ~/.pyenv/versions/notification/bin/python
lrwxr-xr-x 1 robinho staff 77 Nov 23 15:43 /Users/robinho/.pyenv/versions/notification/bin/python -> /Users/robinho/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/bin/python
```
I need the intellij use `/Users/robinho/.pyenv/versions/notification/bin/python`, but it always change to `/Users/robinho/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/bin/python`
How can I solve it?
Please sign in to leave a comment.
SDK configuration path is IDE specific setting and is not shared with your projects. Why does it matter that the target is stored in IDE configuration instead of the symlink?
I need to store the `symlink`, not the target.
The binary use the binary path to set the virtualenv.
```
❯ /Users/robinho/.pyenv/versions/notification/bin/python -m pip list
Package Version Location
----------------- ------- -----------------------------------------
amqp 2.1.1
appnope 0.1.0
astroid 1.4.8
autopep8 1.2.4
billiard 3.5.0.2
celery 4.0.0
click 6.6
```
```
❯ /Users/robinho/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/bin/python -m pip list
pip (8.1.1)
setuptools (20.10.1)
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```
As you can see, booth are using the same binary, but returns different results
Try adding `-Dnative.mac.file.chooser.enabled=false` into .vmoptions: https://intellij-support.jetbrains.com/hc/articles/206544869.
Then configure the SDK from scratch. Does it help?
It appears that Mac native file chooser is always resolving the symlinks.
Another option is to manually fix the path inside jdk.table.xml file in config/options directory (https://intellij-support.jetbrains.com/hc/articles/206544519) when IDE is not running.
It's working. Thanks ! =D