如题
我有参考另一篇文章,但我是初次接觸python,是在Visual Studio2008下使用的
所以在VS2008 IronPython 上如何引入requests?
参考:
https://blog.csdn.net/echojosedream/article/details/52938136
实在不理解你为什么用vs2008+IronPython去编写python程序,这非常不主流。显然,你没有办法用pip
那么你只能去下载对应的库,并且祈祷它尽量少依赖别的库,如果有,再下载所依赖的库,并且把它们都放在你的项目文件中,试试看,不一定行。但是也只能试试看了。
在C# 中添加搜索路径:
var libsPath = new[] {
"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Python Tools for Visual Studio\\2.2",
"D:\\program files\\IronPython 2.7",
"D:\\program files\\IronPython 2.7\\Lib",
"D:\\program files\\IronPython 2.7\\DLLs",
"D:\\program files\\IronPython 2.7\\lib\\site-packages"
};
pyEngine.SetSearchPaths(libs);