# Updating/changing COMPAS version in Rhino Ipython

**URL:** <https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419>\
**Category:** compas\_rhino\
**Created:** [January 15, 2021, 11:27am UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419 "2021-01-15T11:27:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SalMo](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@SalMo](https://forum.compas-framework.org/u/SalMo)\
**Post date:** [January 15, 2021, 11:27am UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/1 "2021-01-15T11:27:06Z")

</div>

I have a couple of questions regarding compas installation for Rhino:

- I used to run “pip -m compas\_rhino.install” for installation, but this gives me the following error:  
“Usage:  
pip [options]  
no such option: -m”

Also, using “python -m compas\_rhino.install” in a specific conda environment gives me this error:

“Traceback (most recent call last):  
File “C:\Users…\Anaconda3\envs\compas-version\lib\runpy.py”, line 183, in \_run\_module\_as\_main  
mod\_name, mod\_spec, code = \_get\_module\_details(mod\_name, \_Error)  
File “C:\Users…\Anaconda3\envs\compas-version\lib\runpy.py”, line 109, in _get\_module\_details  
 **import** (pkg\_name)  
File "C:\Users…\Anaconda3\envs\compas-version\lib\site-packages\compas\_rhino\_init_.py”, line 28, in   
import rhinoscriptsyntax as rs # noqa: F401  
ModuleNotFoundError: No module named ‘rhinoscriptsyntax’"

- If I already have a compas in Rhino, how can I modify its version?

- Is the compas in Rhino related to/affected by the conda environments? If so, how do we know which environment we are working on in Rhino?

---

<div class="post-metadata">

**Author:** ![gonzalocasas](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/gonzalocasas/32/127_2.png) [@gonzalocasas](https://forum.compas-framework.org/u/gonzalocasas)\
**Post date:** [January 18, 2021, 12:44pm UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/2 "2021-01-18T12:44:43Z")

</div>

If you get that error when running `python -m compas_rhino.install`, it means you might have `python.net` installed (or maybe Rhino.Inside) and it is possible to run `import Rhino` outside of Rhino.

Could you try to uninstall those from that specific environment and see if `python -m compas_rhino.install` works then? And if it does, please report an issue so that we fix the Rhino detection to make it compatible with Rhino.Inside.

---

<div class="post-metadata">

**Author:** ![gonzalocasas](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/gonzalocasas/32/127_2.png) [@gonzalocasas](https://forum.compas-framework.org/u/gonzalocasas)\
**Post date:** [January 18, 2021, 12:46pm UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/3 "2021-01-18T12:46:29Z")

</div>

> [@SalMo](#):
>
> how do we know which environment we are working on in Rhino?

to check which environment is active in Rhino, you can use the following:

```python
import compas_bootstrapper
print(compas_bootstrapper.ENVIRONMENT_NAME)

```

---

<div class="post-metadata">

**Author:** ![SalMo](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@SalMo](https://forum.compas-framework.org/u/SalMo)\
**Post date:** [January 27, 2021, 10:29am UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/4 "2021-01-27T10:29:50Z")

</div>

- Is it possible to switch to another environment in Ipython?

- I don’t see any [python.net](http://python.net) or Rhino.Inside in the list of things installed in any of my environments. Although I am using CodeListener for running the Rhino Ipython in VS ([RhinoPython - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=designtoproduction.rhinopython)). But this works automatically in all environments (meaning that I did not install it in a specific environment).

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [February 1, 2021, 11:16am UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/5 "2021-02-01T11:16:16Z")

</div>

happy to help, but i don’t really understand what you are asking…

---

<div class="post-metadata">

**Author:** ![SalMo](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@SalMo](https://forum.compas-framework.org/u/SalMo)\
**Post date:** [February 1, 2021, 2:10pm UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/6 "2021-02-01T14:10:44Z")

</div>

I still have problem running `python -m compas_rhino.install`, and regarding to what Gonzalo mentioned, I don’t think that I have any [python.net](http://python.net) or Rhino.inside installed.

I was also wondering if it is possible to switch envirnoments in Ironpython?

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [February 3, 2021, 8:38pm UTC](https://forum.compas-framework.org/t/updating-changing-compas-version-in-rhino-ipython/419/7 "2021-02-03T20:38:16Z")

</div>

i still don’t really understand but here goes

`pip -m compas_rhino.install` cannot ever have worked because COMPAS has nothing to do with `pip`. the only correct command for installing COMPAS in Rhino is `python -m compas_rhino.install` and all of its variations as described in the docs.

with `python -m compas_rhino.install -p xxx` you can install all sorts of packages in Rhino (not just COMPAS packages), BUT ONLY IF THOSE PACKAGES ARE COMPATIBLE WITH IRONPYTHON

to install COMPAS packages from a specific environment in Rhino, just activate the environment and run the above-mentioned install command. for example, if you have an environment called “salmo” and in it you have installed COMPAS, but also, for example, `compas_cgal`, `compas_fab`, and `shapely`.

the first step would be to activate the environment

```bash
conda activate salmo

```

then uninstall any previously installed packages just to make sure there is no confusion

```python
python -m compas_rhino.uninstall

```

then install all the default packages (`compas`, `compas_rhino`, `compas_ghpython`)

```bash
python -m compas_rhino.install

```

finally install all the additional packages you want to be able to use

```bash
python -m compas_rhino.install -p compas_fab

```

note that i did not include `compas_cgal` or `shapely` because they are wrappers around `C/C++` libs so you cannot use them directly in Rhino. however, they are available through `compas.rpc` and since you installed COMPAS for Rhino from an environment that contained these two packages, `compas.rpc` should not have a problem finding them.

when you restart Rhino, the version of `compas`, `compas_rhino`, `compas_ghpython`, and `compas_fab` installed in the “salmo” environment should now be available.

finally, for future reference…

- i assume with “IPython” you mean “IronPython”. however, “IPython” is usually used to refer to Interactive Python, which is a special type of interactive session launched in the terminal.
- make sure to run the above commands from the Anaconda Prompt. if you run them from an IronPython terminal instead, COMPAS might get confused and think that you are actually working inside Rhino, which will make all sorts of conditional imports fail.
- if you have the RhinoPython code listener plugin installed and you run the install commands from the terminal inside VS Code, perhaps this can also confuse COMPAS into thinking that the current environment is actually inside Rhino.
