Adam M-W
Adam M-W

Reputation: 3539

Using a symlinked module on Windows with Python

Currently I've got a symlinked directory of a python module I want in the same directory as my file, however when my python script tries to import pyamf python raises an ImportError: No module named pyamf.

When copying the directory it works fine, so it's something to do with the symlink (which was created with windows' mklink command rather than msys ln)

Python is version 2.7.2 x64

Upvotes: 4

Views: 949

Answers (1)

speedplane
speedplane

Reputation: 16141

Python 2.7 has problems with Windows symlinks. Instead of making a sym-link, make a directory junction using the \J option. For example:

mklink \J link_dir target_dir

Upvotes: 3

Related Questions