I want to create my own module and just use it like other modules

julia> using MyExample
ERROR: ArgumentError: Package MyExample not found in current path:        
- Run `import Pkg; Pkg.add("MyExample")` to install the MyExample package.

Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:887

I know, that I could include and then use it with using .MyExample. But if I do that with in other moduls I get namesoace conflicts.

Just like in this good video :slight_smile:

You probably want to create a package. Have a look at the manual under β€œPkg”. Also, I reccomend PkgTemplates.jl.

1 Like

Can I use PkgTemplates.jl without a github account?

Yes

In general the package manager works fine with developing packages just locally. It needs to be a git repository though, but no need to have a remote on github or similar. In PkgTemplates.jl just ignore the github field, it will create a remote, but as long as you don’t do git push this is not needed.

(Although, if you are using Julia often, having a github account makes sense, as you need one to report bugs in packages and Julia itself.)

3 Likes