views:

26

answers:

2

I tried to create a symbolic link in python site-packages directory using mklink /D syntax (on Windows 7 machine). Unfortunaly the module is not found when using import clause. When I copy the module physicaly to site-package directory, it works ok. Am I doing something wrong or is this just not possible on windows. I am using python 2.6.

A: 

I just did it on Windows 7 using Python 2.7, and it works. Here are the steps I followed.

  1. open a windows command prompt with necessary privileges
  2. cd to the site-packages directory

    cd c:\Python27\Lib\site-packages

  3. create the link

    mklink /D modulename c:\path\to\module\real\location\modulename

Apreche
Great, it works under python27. I am not sure if it works under 2.6 though.
Gregor S.
A: 

Do you have Microsoft Visual C# Express installed on your computer as well?

I have many symlinks in my site-packages directory, and it all worked fine until I installed C# this afternoon. Now none of my symlink imports work, but they do work if I copy the files instead of symlinking them.

Any thoughts? I might try uninstalling C#.

Humphrey