My question seems somewhat inane, but I cannot seem to find any resources for what I need to do.

Essentially I'm using my work computer to write python applications in my spare time. I'm using Python Portable (syntax version 3.2) because I do not have administrative access and can't do things with path variables etc.

How (if possible) do I install or import selenium so I can use it in Python Portable?

Thanks all!

有帮助吗?

解决方案

Based on answer found Importing modules on portable python and How to install external libraries with Portable Python?

Check for what import sys; print sys.path says?

It displays the list of directories and zipfiles where portable python looks for modules to import. Just copy your modules into one of those directories or zipfiles, or sys.path.append('/whatever/dir') if you have your modules in /whatever/dir and want to keep them there (the latter approach will last only for the current session, be it interactive or a script's execution).



Also on their FAQs

You don’t have package I need, can I add it?

For simpler packages you can use easy install or even extract them in site-packages folder of the Portable Python distribution. However some packages are installing additional dependencies in windows system folders - in this case your Portable Python distribution will not work once you move it to some other workstation. Make sure to do proper testing !


许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top