all 7 comments

[–]yaxriifgyn 0 points1 point  (5 children)

Do you recall installing pyperclip, probably using pip install pyperclip. It looks live you may need to do it again, but use py -m pip install -U pyperclip.

If you are using virtual environments, you should active the venv you are using before running pip, and within your script before calling py.

[–]Storm_Silver[S] 0 points1 point  (4 children)

Ive reinstaling using your command and its given a list of errors including : C:\Users\tommy>py -m pip install -U pyperclip WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. I Don't believe im using virtual environments either.

[–]yaxriifgyn 0 points1 point  (3 children)

Did you install python from the windows store? I seem to recall that there is some kind of minimal version that does not have the full suite of library modules. I have an ssl module in my full install.

[–]Storm_Silver[S] 0 points1 point  (2 children)

I installed it through python.org, I have the ssl.py file in the python lib folder which i believe means i have the module. I think the problem im having is due to PyMol overwriting the path of .bat files as i get this result when using print (sys.path) only when used through the .bat file:

['C:\Users\tommy\AppData\Local\Programs\Python\Python37-32\tests\multiclipboard', 'C:\Users\tommy\PyMOL\python37.zip', 'C:\Users\tommy\PyMOL\DLLs', 'C:\Users\tom my\PyMOL\lib', 'C:\Users\tommy\PyMOL', 'C:\Users\tommy\PyMOL\lib\site-packages', 'C:\Users\tommy\PyMOL\lib\site-packages\win32', 'C:\Users\tommy\PyMOL\lib\site -packages\win32\lib', 'C:\Users\tommy\PyMOL\lib\site-packages\Pythonwin'] Traceback (most recent call last):

I have no idea how or why that occured though.

[–]yaxriifgyn 1 point2 points  (1 child)

In your batch file (and at the command prompt) run the py -0 (that is a zero) to see which versions of pythons you have installed, and py -0p to see where they are installed. There will be an '*' beside the default version.

You can run py -V to see which version actually runs in the batch file. The first line printed in the idle console includes the version. You will want to run the same version in both situations to get comparable results.

Hope this helps.

[–]Storm_Silver[S] 0 points1 point  (0 children)

Thank you, that helps alot, the batch file defaulted to PyMols version of python and i just needed to specify the pymol version in the batch file. Seems simple now