简体   繁体   中英

Need to use python from an external hard drive

I want to be able to plug in an external hard drive on my computer and use the installed python on it to run my programs. So would I start cmd and cd to the new hard drive? When I installed python I installed it onto the hard drive. I just need to know how I would install new packages and make sure the files I have know the correct path. For example on the hard drive I have a program that runs a webcam with Opencv but I don't have that installed on the hard drive version of python. So how would I install modules and make sure my programs on it use the correct path to use them?

You will want a portable version of python. I myself use WinPython for this.
It lets you open a cmd window within the portable context and then you can pip install and do whatever you would normally do but it wont pollute the current OS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM