IEx adding something to the codepath

Hi,
Even if it is related to how to load an external mix project (DataFrame for example) from IElixir, my question is how add a module “visible” from the console for example ? without using: iex -S mix,
I 've try appending like this without success ?
Code.append_path “./dataframe/_build/dev/lib/dataframe/ebin”

thanks for help
arnaud

Why don’t you want to use mix?

And when you use Code.append_path/1, what do you get returned?

If it returns true, what happens when you try to use something from any module in the added path?

Hi,
Because I can’t, I am inside a Jupyter notebook cell, which start elixir kernel…
(https://github.com/pprzetacznik/IElixir)

So, I move to Code.append… and get true !

When you have a project created with mix and want to use Code.append_path, which directory you have to use ? (I took the ebin, but there are many directories in the build folder)

To illustrate my errors:

Two examples from DataFrame project with two errors:

A/

[1] Code.append_path “/Users/arnaudgarcia/Documents/dev/elixir/dataframe/_build/dev/lib/dataframe/ebin”
true
[2] # trying a dataframe creation example

data = DataFrame.new(DataFrame.Table.build_random(6,4), [1,3,4,5], DataFrame.DateRange.new(“2016-09-12”, 6))

%Inspect.Error{message: “got ArgumentError with message “column is not of the right dimmension” while inspecting %{struct: DataFrame.Frame, columns: [~D[2016-09-12], ~D[2016-09-13], ~D[2016-09-14], ~D[2016-09-15], ~D[2016-09-16], ~D[2016-09-17]], index: [1, 3, 4, 5], values: [[0.905774885481212, 0.4351008822922161, 0.7303435227541554, 0.9129132766344731], [0.8350586706543478, 0.0016607496087180929, 0.007627583799604487, 0.22343284746603354], [0.517801966022468, 0.495824436700939, 0.3998929400604335, 0.8614117714039994], [0.5539917967005131, 0.31485805275150314, 0.32484346729178115, 0.7137779856957303], [0.5460843983259391, 0.7475024600080701, 0.14066542500009394, 0.48414344094246653], [0.8022460995239326, 0.8935898429649934, 0.3368457680971688, 0.6024761078856264]]}”}

B/
names = [“Bob”,“Jessica”,“Mary”,“John”,“Mel”]
births = [968, 155, 77, 578, 973]
values = DataFrame.Table.new([names, births], from_columns: true)

** %UndefinedFunctionError{arity: 2, exports: nil, function: :new, module: DataFrame.Table, reason: nil}

Well, it has other dependencies, which you need to add as well… Take a look at its mixfile.

And make sure to also add their dependency folders, etc, etc…

Also your error message looks as if it is working as designed… I do have the same message for the DataFrame.new.


But after “correcting” my mixfile and specify the dep as "~> 0.3" and updating dependencies, the example works.

Great !