# No Module named ast

**URL:** <https://discourse.processing.org/t/no-module-named-ast/13935>\
**Category:** Processing.py\
**Created:** [September 11, 2019, 8:48pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935 "2019-09-11T20:48:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Troy](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@Troy](https://discourse.processing.org/u/Troy)\
**Post date:** [September 11, 2019, 8:48pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/1 "2019-09-11T20:48:55Z")

</div>

I’m having a problem with Processing in python mode. I added the mode and it went through the installation process, but whether I have code to run or not, when pressing Run button I get:

> processing.app.SketchException: ImportError: No module named ast  
> at  
> jycessing.mode.run.SketchRunner.convertPythonSketchError(SketchRunner.java:242)  
> at jycessing.mode.run.SketchRunner.lambda$2(SketchRunner.java:119)  
> at java.lang.Thread.run(Thread.java:748)

If there are troubleshooting steps or suggestions, I would appreciate the help. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [September 11, 2019, 9:18pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/2 "2019-09-11T21:18:12Z")

</div>

Welcome to the forums, Troy.

What is your system setup? Windows/Mac/Linux? Are you trying to run Processing on some network-mounted drive?

---

<div class="post-metadata">

**Author:** ![Troy](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@Troy](https://discourse.processing.org/u/Troy)\
**Post date:** [September 12, 2019, 12:55pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/3 "2019-09-12T12:55:42Z")

</div>

Thank you for replying.

The OS is Windows 10.

It’s a workplace computer, so there are some aspects of it that seem to be dirve mounted and others that are not. I made sure that Processing was located on the C drive as opposed to the desktop. I know the desktop is drive mounted, but not sure what other fecets of this computer environment are.

Python itself is on the C drive in Program Files. Not sure where Java is. I have the JDK\_HOME environment variable set up, but there is no java folder in the Program Files directory.

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [September 12, 2019, 9:32pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/4 "2019-09-12T21:32:55Z")

</div>

> <https://github.com/jdf/processing.py/issues/309>

---

<div class="post-metadata">

**Author:** ![Troy](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@Troy](https://discourse.processing.org/u/Troy)\
**Post date:** [September 13, 2019, 12:54pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/5 "2019-09-13T12:54:14Z")

</div>

This is exactly my problem. Thank you so much, however, there doens’t appear to be an actual fix.

The ‘Processing’ folder that contained the Python mode was located on a networked drove location. I moved the folder to my C drive in my users directory, but then Processing lost Python mode. I understand that is where it was referencing the mode, but how do I tell it to reference the mode in a new location?

I’ll keep trying to work the issue until I find a solution, otherwise I would greatly benefit from your help.

Again, thank you so much.

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [September 13, 2019, 10:14pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/6 "2019-09-13T22:14:48Z")

</div>

I recall encountering this issue a while back when I was using a network account. Unfortunately, I don’t have access to such a setup at the moment, so I cannot test a solution.

As a work-around for now, you could use the command-line version of Processing.py:

[https://py.processing.org/tutorials/command-line/](https://py.processing.org/tutorials/command-line/)

You can now use whatever editor you like, including the Processing IDE (provided you compile from the command-line).

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [September 14, 2019, 4:04am UTC](https://discourse.processing.org/t/no-module-named-ast/13935/7 "2019-09-14T04:04:09Z")

</div>

if your ?company? computer is professionally secured  
following will not work, but it is worth a try:

-a- USB stick ( best USB 3 on USB 3 port )  
-b- unzip processing-3.5.3-windows64.zip to it  
-c- start processing from there and change Preferences to like  
X:\Processing  
-d- **restart** processing  
-e- install all modes and libs you need again now to USB stick  
-f- copy your “sketch work dir” too  
-g- test a python example sketch

( if you start that USB stick processing from the company computer  
you need first to change preferences again to USB dir  
Y:\Processing  
and **restart** processing.  
repeat -g-

* * *

i just tested all that on a newly setup win10 laptop  
please note that processing again will use ( or make new ) its system directory  
/Users/ \< USER \> / AppData/Roaming/Processing  
where the  
preferences.txt  
file is _( and also old error logs under /console/ )_  
/ i have no idea how to FORCE that to the stick too ? /

* * *

---

<div class="post-metadata">

**Author:** ![Troy](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@Troy](https://discourse.processing.org/u/Troy)\
**Post date:** [September 16, 2019, 1:50pm UTC](https://discourse.processing.org/t/no-module-named-ast/13935/8 "2019-09-16T13:50:58Z")

</div>

Thank you both for your feedback. The help has been tremendous.

@kll You hit my issue on the head, I don’t know how to force the install path to something else. I might try a more portable solution like you described, but for now I’m going to go with what I feel is the simpler answer, command line.

@tabreturn I appreciate your assistance. I think you have my solution. I tested out the command line workaround and the program ran, no issue. What I will do is write in the PDE, save, and use the command line to run.

CHEERS!
