简体   繁体   English

无法安装python模块

[英]Unable to install python modules

I am completely new to python, and am unable to install python modules using pip install, and from ____ import _____. 我是python的新手,无法使用pip install和____ import _____安装python模块。

I want to use BeautifulSoup, and I have the tar.gz file in my directory: C:\\Python27\\Lib 我想使用BeautifulSoup,并且我的目录中有tar.gz文件:C:\\ Python27 \\ Lib

I don't have administrator's access to my laptop, but I can get someone who has it. 我没有管理员访问我的笔记本电脑的权限,但是可以找人拥有它。 Would this be a problem from installing modules? 安装模块会不会有问题? I'm actually not sure if this is where it should be, or how to proceed from here. 我实际上不确定这是应该在的位置,还是不确定如何从此处进行。 Would appreciate any help very much, because I can't even get started. 非常感谢您的帮助,因为我什至无法入门。 Thank you. 谢谢。

The easiest way is writting: pip install beautifulsoup on the cmd or powershell 最简单的方法是书写:在cmdpowershellpip install beautifulsoup

Another way: 其他方式:

  1. Extract the file *.tar.gz 提取文件* .tar.gz

  2. open the folder of the extractor on cmd cmd上打开提取器的文件夹

  3. execute python setup.py install 执行python setup.py install

Open command prompt and paste the following (for your scenario specifically)- 打开命令提示符并粘贴以下内容(针对您的具体情况)-

C:\Python27\Scripts\pip.exe install C:\Python27\Lib\beautifulsoup4-4.3.2.tar.gz

Note: Replace the package name if you have a different version. 注意:如果您使用的是其他版本, 替换软件包名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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