草庐IT

re-install

全部标签

python - pip 安装 Pandas : installing dependencies error

我正在尝试在虚拟环境中pipinstallpandas,但我遇到了一个我真的不明白的错误。我猜它与Doublerequirementgiven有关,但我真的不知道从这里该何去何从。 最佳答案 我在Python3.4上遇到了同样的错误。而这个错误的根本原因是"pandas0.21-0.22nolongersupportsPython3.4"查看有关此问题的更多信息:https://github.com/pandas-dev/pandas/issues/20775ProblemwithinstallingpandasforPython3

python 2.7 windows silent installer (.msi) - 设置路径的命令行选项?

当使用静默安装程序(.msi)在Windows上安装python2.7时,是否有命令行选项将Python添加到路径环境变量,如GUI选项?Python3.5安装程序默认包含一个选项PrependPath=0,但是Python2.7可以使用它吗?https://docs.python.org/3/using/windows.html这里似乎讨论了这个问题,但没有针对Python2.7的解决方案?https://bugs.python.org/issue3561编辑这个批处理命令太棒了!!!setx\MPATH"%PATH%;C:\Python\Python27;C:\Python\Pyt

python - setup.py 中的 install_requires 取决于安装的 Python 版本

这个问题在这里已经有了答案:install_requiresbasedonpythonversion(2个答案)关闭2年前。我的setup.py看起来像这样:fromdistutils.coreimportsetupsetup([...]install_requires=['gevent','ssl','configobj','simplejson','mechanize'],[...])在Python2.6(或更高版本)下,ssl模块的安装失败:ValueError:ThisextensionshouldnotbeusedwithPython2.6orlater(alreadybui

python - 如何确保 re.findall() 停在正确的位置?

这是我的代码:a='aaaaaa2aaa3'importrere.findall(r'(.*)',a)结果是:[('title','aaaaaa2aaa3','/title')]如果我曾经设计过一个爬虫来获取网站标题,我最终可能会得到类似这样的东西而不是网站标题。我的问题是,如何限制findall到一个? 最佳答案 如果您只想要一个匹配项,请使用re.search而不是re.findall:>>>s='aaaaaa2aaa3'>>>importre>>>re.search('(.*?)',s).group(1)'aaa'如果您想要所

python - 如何避免 flake 8's "F821 undefined name '_' “when _ has been installed by gettext?

问题概述:在我的项目的主脚本中,gettext安装函数_(),该函数在其他模块中用于翻译(如print(_('Something翻译'))).如thedoc所述:the_()function[is]installedinPython’sbuiltinsnamespace,soitiseasilyaccessibleinallmodulesofyourapplication.所以,一切正常。唯一的问题:flake8显示错误(实际上由PyFlakes返回):$flake8*.pylib.py:2:12:F821undefinedname'_'main_script.py:8:7:F821u

Python 正则表达式 re.match,为什么这段代码不起作用?

这个问题在这里已经有了答案:Whatisthedifferencebetweenre.searchandre.match?(9个回答)关闭去年。这是用Python编写的,importres='189059809102/30589533IronMan30SantaAnaMassagetable/IronMan30SantaAnaMassagetable'pattern='\s(\d{11})/(\d{8})'re.match(pattern,s)它没有返回。我试着把括号拿掉,pattern='\s\d{11}/\d{8}'它仍然返回none。我的问题是:为什么re.match找不到任何东

python - 你如何使用 easy_install 安装 django 旧版本?

我刚刚因为django1.3破坏了我的环境。我的网站都无法运行。所以,我决定使用virtualenv来设置不同版本的python和django的虚拟环境。但是,如果我下载软件包并使用“sudopythonsetup.pyinstall”进行安装,这似乎不会添加到我的虚拟环境中,而是添加到我的原始环境中。我在虚拟环境virtualenv_name/bin文件夹中尝试了“easy_installdjango”,它成功了,但问题是django1.3被自动选择并被添加。我想安装django1.2.5,有没有一种方法可以轻松地安装到我的虚拟环境中? 最佳答案

python - pip install numpy (python 2.7) 失败,错误代码为 1

我在python2.7.9上通过pip安装numpy...我检查了piplist,它返回了pip(1.5.6),setuptools(12.0.4)。我在Windows764位上运行,我已经尝试过Python32和64位版本。pipinstallnumpy结束于:CommandC:\Python27\python.exe-c"importsetuptools,tokenize;__file__='c:\\users\\jon\\appdata\\local\\temp\\pip_build_jon\\numpy\\setup.py';exec(compile(getattr(token

python - 合作实验室 : How to install and use on local machine?

GoogleColab非常好用,但我希望我可以完全在本地和离线运行Colab笔记本,就像从本地提供的Jupyter笔记本一样?我该怎么做?有没有我可以安装的Colab包?编辑:之前对该问题的一些回答似乎提供了访问由Google托管的Colab的方法。但这不是我要找的。我的问题是如何pipinstallcolab以便在pipinstalljupyter之后像jupyter一样在本地运行它。Colab包似乎不存在,所以如果我需要它,我该怎么做才能从源安装它? 最佳答案 从这里Githublink,似乎GoogleColab可能不会(或保

python - 有时 pip install 很慢

我确定这不是网络问题。我的一些机器使用pip安装包非常快,而其他一些机器很慢,从日志中,我怀疑速度慢是因为它会编译包,我想知道如何避免这种编译来进行pip安装快速地。这是慢速pip安装的日志。Collectingnumpy==1.10.4(from-rrequirements.txt(line1))Downloadingnumpy-1.10.4.tar.gz(4.1MB)100%|████████████████████████████████|4.1MB95kB/sRequirementalreadysatisfied(use--upgradetoupgrade):wheel==0.