开发者

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 vers开发者_JAVA百科ion 2.7.2 x64


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜