简体   繁体   中英

Installing Python packages without pip

I've been banging my head against the wall all day. The laptop I use won't allow access to the outside to use pip. So I went to pypi.org and downloaded the request package. I've unpacked it into the python/lib folder.

I then go to the command line and navigate to the new folder and run the python setup.py install.

I've never done this before so I was expecting some feedback from the install.

nothing.

I'm using VS as my IDE.

Any thoughts here?

I found this as a work around

python -m pip install ....

Python is an environmental variable. The laptop I'm working on is a work laptop that I need to return, but since my personal laptop died (no boot device was found was that last information it reported). I am probably not set up as an administrator on this device. Hope this might help you.

I think you have set it up correctly. For whatever package you are installing you need to very carefully read the full instructions. After you are sure that you have set it up correctly you can check by running a simple python script I found on this question:

Check if Python Package is installed

You would then just change the module name to the module you tried to install. Hopefully, this helps!

* EDIT You might also need to run the command terminal as an administrator depending on how your computer is set up.

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