No module found for pygsheets?

Hi, I'm trying to import pygsheets into my 3ds max script, but no matter what I try it says the module can't be found.

 

I'm using pycharm, I've used pip on the cmd to install pygsheets and used the python interpreter in pycharm to install it, I'm not sure why else it isn't working?

7 comments
Comment actions Permalink

Hello, 

>but no matter what I try it says the module can't be found.

what module exactly it is referring to? 

Could you please:

1. activate the same interpreter in cmd

2. run the script

Here is a guide on how to perform this https://intellij-support.jetbrains.com/hc/en-us/articles/360010202240 

Will if fails with the same error? 

 

 

0
Comment actions Permalink

Hi, sure, it's pygsheets. https://pygsheets.readthedocs.io/en/stable/

I've gone through all the steps on there and it still doesn't seem to be working. I've created a venv in my directory, and where I do the steps this comes up:

I used PyQt5 as an example as it seems like no modules seems to be working, still can't be found

0
Comment actions Permalink

Hello, 

on the screenshot attached I see 2 commands, first "where python" - defines the python interpreter executable, the second is "pip install .." - installs a package to the activated venv. To import a module, please run: 

>python

> import PyQt5

0
Comment actions Permalink

This is what I've got now, so I've done pip install PyQt5 after activating the venv, then run python and tried importing, and you can see it's in my code. (The QT widgets seen are from PySide so can be ignored)

It's still coming up that no module is found

 

0
Comment actions Permalink

In the terminal, the module is imported successfully, according to your screenshot. 

What happens if you launch the code? Could you please attach a screenshot? 

Also, please provide me with a screenshot of the interpreter paths https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-reloading-interpreter-paths.html#view for the Project Interpreter. The folder structure under "External libraries" looks weird.  

 

If it possible, please try: 

1. creating a new venv from scratch https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html

2. install the package as described https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html#interpreter-settings 

3. run the code

 

 

0
Comment actions Permalink

Here are the paths, I've highlighted the ones I'm using.

 

I created a new project, used the same venv as I'm using for that other project, and when I use Import PyQt5 it seems to find it fine. 

I'm trying to use this code in 3DS Max, so I've set up a simple function to call the button, but the tool won't even open due to not finding the module. On the listener, this comes up:

0
Comment actions Permalink

So I think I appeared to have fixed it. For some reason it just wasn't finding the right files needed, so I forced it with import sys then

sys.path.append(r'locationOfTools)

That seemed to do the trick. Thank you for all your help!

0

Please sign in to leave a comment.