# How do I invoke pymcuprog?

I have successfully created an ATtiny406 binary using avr-gcc in Linux, and I can program it to the device via Atmel-ICE under Atmel Studio in Windows, and it behaves correctly.

I would prefer to be able to program the device using my Atmel-ICE in Linux. So I did pip3 install pymcuprog-3.7.4.95-py3-none-any.whl and it says:

Successfully installed appdirs cython hidapi intelhex
pyedbglib pymcuprog pyserial pyyaml setuptools-20.7.0


It seems that the packages were installed... but how do I run the utility? As suggested on the mymcuprog website, I tried pymcuprog --help but that said

pymcuprog: Command not found.


I also tried python3.5 -m pymcuprog --help but that said:

/usr/bin/python3.5: No module named pymcuprog.__main__;
'pymcuprog' is a package and cannot be directly executed


I also tried python3.6 -m pymcuprog --help but this is even worse:

/usr/bin/python3.6: No module named pymcuprog


I don't think Ubuntu16 supports Pip in Python 3.6 (I am at the latest python-pip3, and it seems to be Python3.5). In my experience, it's best not to go beyond versions tested by Ubuntu.

Regardless, it seems that pip3 installed the pymcuprog modules in Python3.5 without complaining. I thought pip3 would install the main module as well? (it has worked for me in the past, on other software). If not, then how do I get the main module and run it?

Protip: never run 'pip3 install' without --user; when not working in a special prefix! othewise, it installs stuff in system-wide locations, which are different for different systems and sometimes (and that's the case here) not even looked in by default.

So, uninstall what you've installed using pip3 again, then set up a Python virtual env:

python3 -m venv cloudsenvironment

Then activate it:

source cloudsenvironment/bin/activate

Then you can run pip3 without danger of polluting/breaking your system. That activation bent a few paths, so that with the shell you ran that command from, commands and Python modules are now run from the folder that was created during venv creation. Try it out!

• Yes, that worked -- I now have a working pymcuprog executable. Thank you! – personal_cloud Mar 8 at 3:13