Import Python Module on Server problem
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I want to run my alteryx workflow on the server which has python inside.
This runs fine on my designer. But when I run on server it does not work.
I suspect i tis because the server cannot access my local files.
I have one line that access my local drive,
xlrd = Alteryx.importPythonModule("C:\\Users\\louis\\.conda\\envs\\Python\\Lib\\site-packages\\xlrd")
I get this error:
"Unable to import module -- file does not exist ({})".format(path) 245 print(msg) --> 246 raise ImportError(msg) 247 # get containing directory and module name 248 self.containing_dir = os.path.dirname(self.path) ImportError: Unable to import module -- file does not exist (C:\Users\louis\.conda\envs\Python\Lib\site-packages\xlrd) (Tool Id: 1)
Is there anyway to alter this code so it imports the python module from the server successfully?
- Labels:
- Custom Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Your Server Admin has to add the Python Module to All Worker Nodes before you can run on the server.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @wonka1234
Make sure all python packages are installed on all machines associated with the Server machines.
If there is a run as user account, make sure this user also has access to the python module.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think your server doesn't have an access to that folder. Ask Alteryx admin to install xlrd package in server so that you can directly import that package instead of using above line or else get the access to that folder for your server.
