Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Chapter 14 Modules in Julia 1.1 #26

Open
danpal96 opened this issue May 10, 2019 · 1 comment
Open

Problem with Chapter 14 Modules in Julia 1.1 #26

danpal96 opened this issue May 10, 2019 · 1 comment

Comments

@danpal96
Copy link

I am using Julia 1.1 in Ubuntu 18.04 and was doing the Exercise 14-1 of the Modules Section in chapter 14.

Executing the code:

include("wc.jl")
using LineCount
linecount("wc.jl")

gives the error:

ArgumentError: Package LineCount not found in current path:
- Run `import Pkg; Pkg.add("LineCount")` to install the LineCount package.


Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:823
 [2] top-level scope at In[1]:2

In https://stackoverflow.com/questions/37200025/how-to-import-custom-module-in-julia says that in >0.7 you should use:

include("wc.jl")
using .LineCount
linecount("wc.jl")

that runs with no problem.

Thanks for your work in this great book,
Daniel Palma

@BenLauwens
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants