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.
views:
26answers:
2
+1
Q:
Can modules be added to python search path (e.g site-packages dir) using symbolic links on windows?
A:
I just did it on Windows 7 using Python 2.7, and it works. Here are the steps I followed.
- open a windows command prompt with necessary privileges
cd to the site-packages directory
cd c:\Python27\Lib\site-packages
create the link
mklink /D modulename c:\path\to\module\real\location\modulename
Apreche
2010-07-16 13:19:28
Great, it works under python27. I am not sure if it works under 2.6 though.
Gregor S.
2010-07-17 17:21:53
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
2010-09-01 07:07:11