# Trouble Installing Nextstrain CLI

**URL:** <https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369>\
**Category:** Help and Getting Started\
**Created:** [April 28, 2023, 8:06pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369 "2023-04-28T20:06:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtcaton](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mtcaton](https://nextstrain.discourse.group/u/mtcaton)\
**Post date:** [April 28, 2023, 8:06pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/1 "2023-04-28T20:06:40Z")

</div>

Hello,

I have a Windows computer and was following the instructions here: [Installing Nextstrain — Nextstrain documentation](https://docs.nextstrain.org/en/latest/install.html). However, I am receiving the attached error. It seems like it has to do with a space in my folder name, but I can’t change the name (set up by my job) and, when I’ve tried to reset the directory, it keeps trying to get to this folder… Can you help?

 ![installation error](https://canada1.discourse-cdn.com/flex031/uploads/nextstrain/original/1X/584dd334fd01cb99ffb1760010fceaf8fe213042.jpeg)

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [April 28, 2023, 8:17pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/2 "2023-04-28T20:17:31Z")

</div>

Hi @mtcaton,

It looks like you have two commands in the same line:

```plaintext
cd "C:\Users\Mikala Caton\" Invoke-RestMethod https://nextstrain.org/cli/installer/windows | Invoke-Expression

```

They should be entered separately:

```plaintext
cd "C:\Users\Mikala Caton\"

```

```plaintext
Invoke-RestMethod https://nextstrain.org/cli/installer/windows | Invoke-Expression

```

The first command isn’t required for Nextstrain installation, so try running the command starting with `Invoke-RestMethod` and let us know if that doesn’t work.

– Victor

---

<div class="post-metadata">

**Author:** ![mtcaton](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mtcaton](https://nextstrain.discourse.group/u/mtcaton)\
**Post date:** [April 28, 2023, 8:27pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/3 "2023-04-28T20:27:28Z")

</div>

> [@victorlin](#):
>
> `Invoke-RestMethod https://nextstrain.org/cli/installer/windows | Invoke-Expression`

Unfortunately, I got the same error when I ran them separately.

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [April 28, 2023, 8:31pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/4 "2023-04-28T20:31:01Z")

</div>

@mtcaton can you post a screenshot of the error from running them separately?

I don’t have a Windows computer on hand to verify, but the error from the screenshot above looks to be because `cd` is having trouble understanding what `Invoke-RestMethod` is. I wouldn’t expect the same error message if they are run separately.

---

<div class="post-metadata">

**Author:** ![mtcaton](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mtcaton](https://nextstrain.discourse.group/u/mtcaton)\
**Post date:** [April 28, 2023, 9:06pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/5 "2023-04-28T21:06:24Z")

</div>

![error 3](https://canada1.discourse-cdn.com/flex031/uploads/nextstrain/original/1X/33053dd9ee4cc6970a9022a1506bb645a8092782.jpeg)  
hmm yes, I see what you’re saying. Here is the error when I have run them separately.

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [April 28, 2023, 10:25pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/6 "2023-04-28T22:25:46Z")

</div>

That makes more sense. You’re right, this is happening because of the space in your folder name. I’ve opened an [issue](https://github.com/nextstrain/cli/issues/276) in our GitHub repository and we will look into fixing it.

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [April 28, 2023, 11:06pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/7 "2023-04-28T23:06:44Z")

</div>

@mtcaton

I have implemented a [fix](https://github.com/nextstrain/cli/pull/277) for this issue. It is not officially released yet, but in the meantime you can try this command which should work:

```auto
Invoke-RestMethod https://raw.githubusercontent.com/nextstrain/cli/victorlin/fix-windows-install/bin/standalone-installer-windows | Invoke-Expression

```

---

<div class="post-metadata">

**Author:** ![mtcaton](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mtcaton](https://nextstrain.discourse.group/u/mtcaton)\
**Post date:** [April 29, 2023, 4:56pm UTC](https://nextstrain.discourse.group/t/trouble-installing-nextstrain-cli/1369/8 "2023-04-29T16:56:21Z")

</div>

> [@victorlin](#):
>
> `Invoke-RestMethod https://raw.githubusercontent.com/nextstrain/cli/victorlin/fix-windows-install/bin/standalone-installer-windows | Invoke-Expression`

It worked! Thank you so much!
