# Create a Package

**URL:** <https://discourse.julialang.org/t/create-a-package/20280>\
**Category:** General Usage\
**Created:** [January 30, 2019, 3:07pm UTC](https://discourse.julialang.org/t/create-a-package/20280 "2019-01-30T15:07:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 3:07pm UTC](https://discourse.julialang.org/t/create-a-package/20280/1 "2019-01-30T15:07:28Z")

</div>

Hello Julia Community,  
i have a question what if i want to create a Package on Julia 0.7 is it possible and if it’s yes how can i do that ?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 30, 2019, 3:15pm UTC](https://discourse.julialang.org/t/create-a-package/20280/2 "2019-01-30T15:15:23Z")

</div>

See here: [5. Creating Packages · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/creating-packages/)

You should use Julia 1.1 (or 1.0) for a new package, not 0.7.

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 3:17pm UTC](https://discourse.julialang.org/t/create-a-package/20280/3 "2019-01-30T15:17:21Z")

</div>

thanks, can’t i use 0.7 cause it’s more stable?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 30, 2019, 3:24pm UTC](https://discourse.julialang.org/t/create-a-package/20280/4 "2019-01-30T15:24:07Z")

</div>

Not really, 0.7 was just made as a transition from 0.6 to 1.0: [PSA: use Julia 0.7 if you are upgrading](https://discourse.julialang.org/t/psa-use-julia-0-7-if-you-are-upgrading/13321). If you need the most stability, use 1.0.x. But really, just just 1.1.x (or later).

---

<div class="post-metadata">

**Author:** ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Post date:** [January 30, 2019, 3:59pm UTC](https://discourse.julialang.org/t/create-a-package/20280/5 "2019-01-30T15:59:00Z")

</div>

Have a try on [PkgTemplates.jl](https://github.com/invenia/PkgTemplates.jl) if you decide to use v1.0?

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 4:05pm UTC](https://discourse.julialang.org/t/create-a-package/20280/6 "2019-01-30T16:05:55Z")

</div>

it shows me this error message when i type: t=Template()

ERROR: ArgumentError: No GitHub username found, set one with user=username

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [January 30, 2019, 4:09pm UTC](https://discourse.julialang.org/t/create-a-package/20280/7 "2019-01-30T16:09:39Z")

</div>

Did you try to set one with `user=username`? I.e. `Template(user = "marouane")`.

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 4:19pm UTC](https://discourse.julialang.org/t/create-a-package/20280/8 "2019-01-30T16:19:44Z")

</div>

it shows me this:  
ERROR: MethodError: no method matching Template(::String)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [January 30, 2019, 4:20pm UTC](https://discourse.julialang.org/t/create-a-package/20280/9 "2019-01-30T16:20:43Z")

</div>

Could you copy paste what you wrote?

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 4:21pm UTC](https://discourse.julialang.org/t/create-a-package/20280/10 "2019-01-30T16:21:57Z")

</div>

julia\>using PkgTemplates

julia\> t=Template(“midow”)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [January 30, 2019, 4:22pm UTC](https://discourse.julialang.org/t/create-a-package/20280/11 "2019-01-30T16:22:51Z")

</div>

```julia
Template(user = "marouane").

```

```julia
Template("midow")

```

There is a difference.

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 4:24pm UTC](https://discourse.julialang.org/t/create-a-package/20280/12 "2019-01-30T16:24:54Z")

</div>

ohhhh yeah you’re right i didn’t notice that, thank you very much.

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 30, 2019, 4:34pm UTC](https://discourse.julialang.org/t/create-a-package/20280/13 "2019-01-30T16:34:41Z")

</div>

still when i wrote my github username and went to the next command which is:  
generate(“name of Pkg”,t), it shows me this:

ERROR: GitError(Code:ENOTFOUND, Class:Config, config value ‘user.name’ was not found)

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [January 30, 2019, 4:46pm UTC](https://discourse.julialang.org/t/create-a-package/20280/14 "2019-01-30T16:46:25Z")

</div>

Here is a beginners tutorial that provides a tested and simple (if inflexible) workflow. It may be useful to get started [https://lectures.quantecon.org/jl/testing.html](https://lectures.quantecon.org/jl/testing.html)

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 31, 2019, 6:16am UTC](https://discourse.julialang.org/t/create-a-package/20280/15 "2019-01-31T06:16:51Z")

</div>

everything was okay till it showed me a warning:  
Git config option ‘user.name’ missing, package generation will fail unless you supply a GitConfig  
after typing the command of  
generate(“Cwrap”.jl, ourTemplate)  
this error showed up:  
ERROR: type String has no field jl  
and i don’t know what does it mean.

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 31, 2019, 8:18am UTC](https://discourse.julialang.org/t/create-a-package/20280/16 "2019-01-31T08:18:32Z")

</div>

Well, you need to read/type carefully! This `"Cwrap".jl` not the same as the correct `"Cwrap.jl"`.

Then concerning the git error, a quick google brings up [Git - First-Time Git Setup](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), which should get you up to speed with your git setup.

PS: please quote your code! Best have a read through: [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757).

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [January 31, 2019, 1:43pm UTC](https://discourse.julialang.org/t/create-a-package/20280/17 "2019-01-31T13:43:18Z")

</div>

If you look at [https://lectures.quantecon.org/jl/testing.html#Julia-Setup](https://lectures.quantecon.org/jl/testing.html#Julia-Setup) it shows you the right command for the git config. Alternatively, I think you can use the `user = ` argument in the function.

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 31, 2019, 2:53pm UTC](https://discourse.julialang.org/t/create-a-package/20280/18 "2019-01-31T14:53:29Z")

</div>

thank you very much i’ve created the package succefully and now i need to put the content inside it and there is another package like mine but it’s outdated i want to put the content of that package in mine it’s like cloning.

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [January 31, 2019, 3:19pm UTC](https://discourse.julialang.org/t/create-a-package/20280/19 "2019-01-31T15:19:08Z")

</div>

Cool. Using the other package, just be sure to include the appropriate stuff into your license file. (and maybe a shout-out in the README)

---

<div class="post-metadata">

**Author:** ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)\
**Post date:** [January 31, 2019, 3:21pm UTC](https://discourse.julialang.org/t/create-a-package/20280/20 "2019-01-31T15:21:53Z")

</div>

the problem right now is i’m struggling on how am i suppose to do that cause it’s my first time.

[Next page](https://discourse.julialang.org/t/create-a-package/20280.md?page=2)
