简体   繁体   中英

How to run python from usb?

I am trying to download and run Python and PyCharm off of a usb stick because I am a newbie and suck with remembering all the OS specific setup, so the code I work on at work, does not work on my home computer.

When I try to run python.exe from the usb drive, I get the error "Windows cannot access the specified device path or file you may not have appropriate permissions". I am local admin and can open folders, just not run the exe.

Any help would be greatly appreciated

TL;DR I want a centralized place for all of my code to be neatly and easily stored, retrieved, edited, and tested.

use python virtualenv

pip install virtualenv
python -m virtualenv mypython

It will generate a 'new' python ( mypython ) that you may copy into your USB stick.

Read the documentation here .

Try Portable Python .

Python virtualenv use your installed python that's why you can't share it using usb stick or add it on your github repository.

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