jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Cannot import site module.... #195

Closed peterdcasey closed 6 years ago

peterdcasey commented 6 years ago

Win10 Creators Edition Enterprise - I have no idea what the following error is about. When trying to run Processing in Python mode after an install of Processing and Python mode.

ImportError: Cannot import site module and its dependencies: No module named site
Determine if the following attributes are correct:
  * sys.path: [C:\Users\pcasey\AppData\Local\Temp\pythonmode6467124486114794085, C:\Users\pcasey\AppData\Local\Temp\pythonmode6467124486114794085, \\fs2\Home\pcasey\My Documents\Processing\modes\PythonMode\mode\Lib, __classpath__, __pyclasspath__/]
    This attribute might be including the wrong directories, such as from CPython
  * sys.prefix: \\fs2\Home\pcasey\My Documents\Processing\modes\PythonMode\mode
    This attribute is set by the system property python.home, although it can
    be often automatically determined by the location of the Jython jar file

You can use the -S option or python.import.site=false to not import the site module
jdf commented 6 years ago

Where does that error message appear? When?

peterdcasey commented 6 years ago

It appears as seen in the image as soon as the run button is pressed. The computer is on an active directory domain. I previously did install Pytyon 3.6x. Windows 10 Creators Enterprise.

image

jdf commented 6 years ago

Give build 3030 or better a try.

peterdcasey commented 6 years ago

I'm clueless. If I use Add Mode... in Processing I only see the 3029 Python Mode. How would I access 3030?

Thank you

jdf commented 6 years ago

Uninstall and reinstall.

On Wed, Oct 11, 2017 at 5:17 PM Peter Casey notifications@github.com wrote:

I'm clueless. If I use Add Mode... in Processing I only see the 3029 Python Mode. How would I access 3030?

Thank you

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jdf/Processing.py-Bugs/issues/195#issuecomment-335951438, or mute the thread https://github.com/notifications/unsubscribe-auth/AADajCYQ0fp74LtCIZLsQFC_frCJmhscks5srTCCgaJpZM4PzADz .

-- -- Jonathan Feinberg jdf@pobox.com http://MrFeinberg.com

peterdcasey commented 6 years ago

Complete reinstall of Processing. Go to Add Mode... and 3029 is still there. Any thoughts? The Updates button shows nothing....

image

jdf commented 6 years ago

In the screen shot you show, you have not installed Python Mode. If you do, you'll find that it has installed 3030.

peterdcasey commented 6 years ago

Looks like progress but..... (sorry about this, if you think it is my machine and want to be done with it, please let me know)

image Fresh install.

jdf commented 6 years ago

Could you dump your environment variables here?

peterdcasey commented 6 years ago

ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\pcasey\AppData\Roaming asl.log=Destination=file CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=COCC-17-18223 ComSpec=C:\Windows\system32\cmd.exe HOMEDRIVE=C: HOMEPATH=\Users\pcasey LOCALAPPDATA=C:\Users\pcasey\AppData\Local LOGONSERVER=\DC7 NUMBER_OF_PROCESSORS=8 OneDrive=C:\Users\pcasey\OneDrive OS=Windows_NT Path=C:\Program Files (x86)\Python36-32\Scripts\;C:\Program Files (x86)\Python36-32\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Users\pcasey\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\pcasey\AppData\Local\GitHubDesktop\bin;C:\Users\pcasey\AppData\Local\Temp\pythonmode6467124486114794085;C:\Users\pcasey\AppData\Local\Temp\pythonmode6467124486114794085;\fs2\Home\pcasey\My Documents\Processing\modes\PythonMode\mode\Lib, classpath, pyclasspath]; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 9, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9e09 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$P$G PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public python.home=\fs2\Home\pcasey\My Documents\Processing\modes\PythonMode\mode SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\Windows TEMP=C:\Users\pcasey\AppData\Local\Temp TMP=C:\Users\pcasey\AppData\Local\Temp USERDNSDOMAIN=AD.COCC.EDU USERDOMAIN=AD USERDOMAIN_ROAMINGPROFILE=AD USERNAME=pcasey USERPROFILE=C:\Users\pcasey windir=C:\Windows

jdf commented 6 years ago

Remove python.home completely, and remove all of that weird python-related stuff from your Path, and let me know.

Python Mode doesn't use Python, and all of that stuff is confusing.

peterdcasey commented 6 years ago

Everything Python removed. Clean install (copy) of Processing on my Desktop. Added the Python mode. Immediately the error shown below appeared. (I did not notice it and started typing 'setup()' but did not run it.) Then I pressed run and the second error appeared.

image

image

jdf commented 6 years ago

I'm guessing you didn't log out and log back in after modifying your environment.

The first error suggests an old version of Python Mode.

peterdcasey commented 6 years ago

Restarted, clean path etc. Date stamps on everything mode related is today. The ImportError above is what I get when I try to run anything. I removed the path information about Python 3.6 assuming Python mode does not require a Python install. For some reason it cannot find the ast module. Directory shown below.

image

jdf commented 6 years ago

The date stamps don't help; what version does the Modes installer say you have?

peterdcasey commented 6 years ago

image

jdf commented 6 years ago

I can't make any sense of any part of this situation, to tell you the truth. If you have any new data or new insights, please do share them with me here.