I am using IronPython 3.4 in Visual Studio and I am trying to get nltk to work. I had an error saying no module named 'nltk' but I have got this to work now. Now I am getting the exception of no module named 'future' this is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp4
{
class Program
{
static void Main(string[] args)
{
Microsoft.Scripting.Hosting.ScriptEngine pythonEngine = IronPython.Hosting.Python.CreateEngine();
ICollection<string> paths = pythonEngine.GetSearchPaths();
string dir = "C:\\Users\\Charlie\\Anaconda3\\Lib\\site-packages";
paths.Add(dir);
pythonEngine.SetSearchPaths(paths);
Microsoft.Scripting.Hosting.ScriptSource pythonScript = pythonEngine.CreateScriptSourceFromString("import nltk");
pythonScript.Execute();
}
}
}
I am getting this error:
IronPython.Runtime.Exceptions.ImportException: 'No module named '__future__''
When I go to anaconda prompt however and type pip install future I am getting this returned:
Requirement already satisfied (use --upgrade to upgrade): future in c:\users\charlie\anaconda3\lib\site-packages
Any ideas would be greatly appreciated. Thank you!