# Can't install q2-SCNIC

**URL:** https://forum.qiime2.org/t/cant-install-q2-scnic/17300
**Category:** Library Support
**Created:** [October 31, 2020, 11:56pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300 "2020-10-31T23:56:30Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jrw187](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jrw187](https://forum.qiime2.org/u/jrw187)
#### Post date: [October 31, 2020, 11:56pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/1 "2020-10-31T23:56:30Z")

</div>

> [@q2-SCNIC: A tool for making correlation networks, finding modules of observations and summarizing them](https://forum.qiime2.org/t/q2-scnic-a-tool-for-making-correlation-networks-finding-modules-of-observations-and-summarizing-them/6116/1):
>
> `conda install -c lozuponelab q2-SCNIC`

I am interested in using this plugin. However, when I try to install, I get an error. Here is the full terminal output:

(qiime2-2020.2) jenweinert@x86\_64-apple-darwin13 ~ % conda install -c lozuponelab q2-SCNIC  
Collecting package metadata (current\_repodata.json): done  
Solving environment: failed with initial frozen solve. Retrying with flexible solve.  
Solving environment: failed with repodata from current\_repodata.json, will retry with next repodata source.  
Collecting package metadata (repodata.json): done  
Solving environment: failed with initial frozen solve. Retrying with flexible solve.  
Solving environment: -  
Found conflicts! Looking for incompatible packages.  
This can take several minutes. Press CTRL-C to abort.  
failed

UnsatisfiableError: The following specifications were found  
to be incompatible with the existing python installation in your environment:

Specifications:

- q2-scnic -\> python=3.5

Your python: python=3.6.7

If python is on the left-most side of the chain, that's the version you've asked for.  
When python appears to the right, that indicates that the thing on the left is somehow  
not available for the python version you are constrained to. Note that conda will not  
change your python version to a different minor version unless you explicitly specify  
that.

Based on my reading of the error message, I would say that your plug-in requires a different version of python than I have installed on my computer (Mac). Just wanted to know if there was a good work-around for this or what you would recommend doing. I don't want to do anything that could potentially mess up other things with the computer, so thought I might ask here.

Thanks for any help/suggestions.

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [November 2, 2020, 2:17pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/2 "2020-11-02T14:17:12Z")

</div>

Hi @jrw187! q2-SCNIC hasn't seen any updates in a few years, but I think it was recently revived by @kthurimella, perhaps there is some news or status updates that can be shared here...

---

<div class="post-metadata">

### Author: ![jrw187](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jrw187](https://forum.qiime2.org/u/jrw187)
#### Post date: [November 3, 2020, 11:49pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/3 "2020-11-03T23:49:37Z")

</div>

I got this to work.

The installation was successful using code from the plugin library page.

From the library page -  
This worked: pip install scnic  
This failed: conda install -q scnic

And the code from this tutorial still did not work.

But I was able to install and run it using that alternate command for install.

---

<div class="post-metadata">

### Author: ![kthurimella](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kthurimella/32/9229_2.png) [@kthurimella](https://forum.qiime2.org/u/kthurimella)
#### Post date: [November 5, 2020, 12:13am UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/4 "2020-11-05T00:13:57Z")

</div>

Hey @jrw187. Thanks for using SCNIC. Good to know that the pip install was able to work. Can you provide me with some of the error messages you ran into when running the code from the tutorial?

---

<div class="post-metadata">

### Author: ![Nayeli\_Luis\_Vargas](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nayeli_luis_vargas/32/8963_2.png) [@Nayeli\_Luis\_Vargas](https://forum.qiime2.org/u/Nayeli_Luis_Vargas)
#### Post date: [December 7, 2020, 12:32am UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/5 "2020-12-07T00:32:45Z")

</div>

omg, I was fighting with conda all day, and this is magic. Thank you very much!

---

<div class="post-metadata">

### Author: ![Tingting\_Chen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/tingting_chen/32/10771_2.png) [@Tingting\_Chen](https://forum.qiime2.org/u/Tingting_Chen)
#### Post date: [April 8, 2021, 4:05pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/6 "2021-04-08T16:05:47Z")

</div>

I have succussfully instaled using the pip option, however, qiime still does not show plugin. Here are some of the messages I got :

successfully built scnic

Installing collected packages: scnic

Successfully installed scnic-0.6.2

(qiime2-2020.8) localhost:subtables able$ qiime SCNIC sparcc-filter

**Error: QIIME 2 has no plugin/command named 'SCNIC'.**

(qiime2-2020.8) localhost:subtables able$ qiime scnic-0.6.2 sparcc-filter

**Error: QIIME 2 has no plugin/command named 'scnic-0.6.2'.**

(qiime2-2020.8) localhost:subtables able$ qiime scnic sparcc-filter

**Error: QIIME 2 has no plugin/command named 'scnic'.**

many thanks for the help.

---

<div class="post-metadata">

### Author: ![kthurimella](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kthurimella/32/9229_2.png) [@kthurimella](https://forum.qiime2.org/u/kthurimella)
#### Post date: [April 8, 2021, 4:39pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/7 "2021-04-08T16:39:49Z")

</div>

Hi Tingting,

To use SCNIC once it's installed the use case is below. There are different modes that you can see by doing SCNIC\_analysis.py -h

```auto
SCNIC_analysis.py within -i example_table.biom -o within_output/ -m sparcc

```

Hope this helps!

---

<div class="post-metadata">

### Author: ![jrw187](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jrw187](https://forum.qiime2.org/u/jrw187)
#### Post date: [April 14, 2021, 2:51pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/8 "2021-04-14T14:51:51Z")

</div>

Hi @kthurimella,

Sorry that I did not reply to your earlier message on this string. I got diverted onto some other data analysis and am just coming back around to this now. If it would still be helpful, I can go back and find some of the coding and error messages from that time from my attempts at installing using the tutorial.

I do have one question for you though. I was able to get SCNIC to run. However, ideally, you would run the correlations with sparcc as the method. This does not work and produces an error. I have included the full code and error message below. However, everything works fine if I set the method to Spearman rather than sparcc. Can you provide a suggestion as to how I could get the sparcc correlation to run? Thanks!

**Code and Error Message:**

(qiime2-2020.2) jenweinert@x86\_64-apple-darwin13 protein % qiime SCNIC calculate-correlations   
--i-table scnic-rarefied-table.qza   
--p-method sparcc   
--o-correlation-table scnic-rarefied-correls.qza   
--verbose  
Correlating with sparcc  
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/biom/table.py:4068: FutureWarning: SparseDataFrame is deprecated and will be removed in a future version.  
Use a regular DataFrame whose columns are SparseArrays instead.

See [Sparse data structures — pandas 2.2.3 documentation](http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating) for more.

return constructor(mat, index=index, columns=columns)  
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pandas/core/sparse/frame.py:257: FutureWarning: SparseSeries is deprecated and will be removed in a future version.  
Use a Series with sparse values instead.

```
>>> series = pd.Series(pd.SparseArray(...))

```

See [Sparse data structures — pandas 2.2.3 documentation](http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating) for more.

sparse\_index=BlockIndex(N, blocs, blens),  
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pandas/core/generic.py:4583: FutureWarning: SparseSeries is deprecated and will be removed in a future version.  
Use a Series with sparse values instead.

```
>>> series = pd.Series(pd.SparseArray(...))

```

See [Sparse data structures — pandas 2.2.3 documentation](http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating) for more.

return self.\_constructor(new\_data). **finalize** (self)  
/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pandas/core/frame.py:3471: FutureWarning: SparseSeries is deprecated and will be removed in a future version.  
Use a Series with sparse values instead.

```
>>> series = pd.Series(pd.SparseArray(...))

```

See [Sparse data structures — pandas 2.2.3 documentation](http://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html#migrating) for more.

return klass(values, index=self.index, name=items, fastpath=True)  
Traceback (most recent call last):  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 328, in **call**  
results = action(\*\*arguments)  
File "\</Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-863\>", line 2, in calculate\_correlations  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound\_callable  
output\_types, provenance)  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2\_SCNIC/\_SCNIC\_methods.py", line 29, in calculate\_correlations  
correls = ca.fastspar\_correlation(table, verbose=True, nprocs=n\_procs)  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/SCNIC/correlation\_analysis.py", line 83, in fastspar\_correlation  
path.join(temp, 'covar\_table.tsv'), stdout, nprocs)  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/SCNIC/correlation\_analysis.py", line 71, in run\_fastspar  
covar\_table\_loc, '-t', str(nprocs)], stdout=stdout, check=True)  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py", line 403, in run  
with Popen(\*popenargs, \*\*kwargs) as process:  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py", line 709, in **init**  
restore\_signals, start\_new\_session)  
File "/Users/jenweinert/miniconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py", line 1344, in \_execute\_child  
raise child\_exception\_type(errno\_num, err\_msg, err\_filename)  
FileNotFoundError: [Errno 2] No such file or directory: 'fastspar': 'fastspar'

Plugin error from SCNIC:

[Errno 2] No such file or directory: 'fastspar': 'fastspar'

See above for debug info.

---

<div class="post-metadata">

### Author: ![kthurimella](https://forum.qiime2.org/user_avatar/forum.qiime2.org/kthurimella/32/9229_2.png) [@kthurimella](https://forum.qiime2.org/u/kthurimella)
#### Post date: [April 14, 2021, 4:02pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/9 "2021-04-14T16:02:39Z")

</div>

Hey @jrw187, thanks so much for that! I think it's a version issue that was brought up here recently: [q2 scnic fails in calculating correlations](https://forum.qiime2.org/t/q2-scnic-fails-in-calculating-correlations/18932)

Let me know if that doesn't work.

Kumar

---

<div class="post-metadata">

### Author: ![jrw187](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jrw187](https://forum.qiime2.org/u/jrw187)
#### Post date: [April 14, 2021, 5:22pm UTC](https://forum.qiime2.org/t/cant-install-q2-scnic/17300/10 "2021-04-14T17:22:55Z")

</div>

Hi @kthurimella,

I think this is a different issue. The error messages that I am getting aren't the same as the other user mentioned in that separate post. I tried running the code for sparcc correlation in multiple versions (i.e. 2020.8, 2020.2, 2019.10, 2019.7) and got the same error message regardless of the version that I used. Spearman as the correlation method worked for all these versions.

Thanks in advance for any suggestions!
