Skip to main content
Solved

Problem to install python library on a server

  • June 28, 2016
  • 3 replies
  • 79 views

Forum|alt.badge.img

On my computer, I installed my library (pyPDF2) and my python scripts are working fine; thanks to the tutorial :

https://knowledge.safe.com/content/kbentry/841/ins...

Now I have to test my scrpits directly on a server in my workplace. I finally manage to install the library via the prompt run as administrator.

But I still have the error message :

Python Exception <ImportError>: No module named PyPDF2

Something is missing, isn't it?

Best answer by slerendu

Problem solved.

Finally, I had to run the command <path to easy_install>easy_install.exe pyPDF2

Instead of the previous one.

Thanks for your help and time.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • June 28, 2016

Sounds like you've either

  • forgotten to install the module pyPDF2 on FME Server
  • or have installed it into a different Python interpreter than the one used by FME Server

Look at the workspace log on FME Server, there will be some references to where it expects Python to be installed, make sure you've installed your module there.


Forum|alt.badge.img
  • Author
  • Best Answer
  • June 28, 2016

Problem solved.

Finally, I had to run the command <path to easy_install>easy_install.exe pyPDF2

Instead of the previous one.

Thanks for your help and time.


Forum|alt.badge.img
  • Author
  • July 22, 2016

Sounds like you've either

  • forgotten to install the module pyPDF2 on FME Server
  • or have installed it into a different Python interpreter than the one used by FME Server

Look at the workspace log on FME Server, there will be some references to where it expects Python to be installed, make sure you've installed your module there.

Actually, it's not on FME Server, sorry for the misunderstood. I use FME Desktop, on a server (Windows Server 2012).

But, it's the wronf interpreter indeed. When I use the command fme python ez_setup.py, it seems to use the first version of FME on its route (2011 instead of 2015).

So I went into the right repository (2015) and run :

fme.exe python <path to my file>ez_setup.py

It worked fine.

But when I run the command :

fme.exe python easy_install pyPDF2

It told me that "some packages may not be found"