草庐IT

install-write

全部标签

python - 当 "pip install <package name>"时会发生什么

我们做的时候的步骤顺序是什么$pipinstall更具体的问题pip如何找到包?pip将包存储在哪里?如何卸载软件包? 最佳答案 1。pip是怎么找到包的?在网络上,来自官方存储库PyPI(Python包索引)。所有包的完整列表canbefoundhere.2。pip将包存放在哪里?它们安装在您的Python目录中,具体取决于您的操作系统。搜索PYTHON_PATH/Lib/sites-packages,你可能会找到通过pip安装的包:)3。如何卸载软件包?pipuninstall 关于

python - pip install 和 sudo pip install 有什么区别?

我尝试在虚拟环境中使用sudo安装Flask和一些软件包,但在尝试导入Flask时,它会抛出ImportError。在使用pipinstall安装相同的包时,虽然它工作正常。那么这些方法有什么区别呢?我在Ubuntu上试过这个。另外,pip在哪里安装这些包?通过StackOverflow,我只能找到回答如何列出pip安装的包的问题,​​而不是在哪里找到它们(在虚拟环境的上下文中) 最佳答案 pipinstall将以当前用户身份运行pipinstallsudopipinstall将使用另一个用户的安全权限运行pipinstall,例如

python - 为什么我无法通过手动 *python setup.py install* 获得 *pip install* 的准确结果?

我喜欢通过setuptools来弄清楚Python命名空间包背后的神话,这是我所做的测试。通过virtualenv创建一个虚拟环境。在PyPI上找到一个命名空间包。通过pipinstall安装该包。检查安装的文件层次结构。我玩的包是zope.interface它与我的virtualenv上的以下文件层次结构配合得很好:~virenv/.../site-packages/zope.interface-3.8.0-py2.6-nspkg.pth/zope.interface-3.8.0-py2.6.egg-info//zope//interface//...一切看起来都很好,我喜欢zope

python - 操作错误 : attempt to write a readonly database in ubuntu server

我在Ubuntu服务器上使用mod_wsgi和apache2运行FlaskApp。我尝试在localhost上成功运行flask应用程序,然后将其部署到ubuntu服务器上。但是当我尝试更新数据库时,出现错误:Failedtoupdatemodel.(OperationalError)attempttowriteareadonlydatabaseu'UPDATEmysongsSETsongurl=?WHEREsongid.id=?'(u'www.site.com/I_wanna_dance',1)现在我尝试查找数据库文件权限,它是:-rwxr-xr-x1www-datawww-data

Python 可嵌入 zip : install Tkinter

Pythonembeddablezip没有pip和Tkinter。很容易installpipwithget-pip.py在可嵌入的zip中。我们如何也安装Tkinter(假设我们没有在同一台机器上安装现有的Python)? 最佳答案 假设您在Windows上并且还安装了常规Python发行版(与嵌入式发行版相同版本),要在嵌入式发行版中安装Tkinter,您可以从常规Python发行版中复制以下文件:tcl文件夹到embedded_distribution_folder\(嵌入式分发的根文件夹)tkinter文件夹(位于Lib下)到

python - 树莓派-Python : Install Pandas on Python 3. 5.2

我有一台装有最新版本Raspbian的Raspberry3ModelB(与Noobs2.3.0一起安装)。我已经按照说明成功安装了Python3.5.2在这篇文章中找到:http://bohdan-danishevsky.blogspot.com.es/2015/10/building-python-35-on-raspberry-pi-2.html我正在尝试在该版本的Python(不是3.4)上安装Pandas(特别是0.18或更高版本)。我已经尝试过pip安装,但无法使其指向python3.5.2,即使卸载3.4版也是如此。我也试过了sudoapt-getinstallpython

Python:os.read()/os.write() 在 os.pipe() 线程安全吗?

考虑:pipe_read,pipe_write=os.pipe()现在,我想知道两件事:(1)我有两个线程。如果我保证只有一个正在读取os.read(pipe_read,n)而另一个只在写入os.write(pipe_write),我会不会有任何问题,即使如果两个线程同时做呢?我会得到所有以正确顺序写入的数据吗?如果他们同时做会怎样?是否有可能将单个写入分段读取,例如?:Thread1:os.write(pipe_write,'1234567')Thread2:os.read(pipe_read,big_number)-->'123'Thread2:os.read(pipe_read,

python - 模型类未声明显式 app_label 并且不在 INSTALLED_APPS 的应用程序中

我正在使用sphinx并试图为我的Django项目生成文档。我决定首先尝试记录模型,所以在我的.rst文件中我这样做了wdland\.models==============..automodule::wdland.models:members::undoc-members::show-inheritance:但是得到以下错误WARNING:/home/fabou/wdlandenvpy3/source/docs/wdland.rst:9:(WARNING/2)autodoc:failedtoimportmodule'wdland.models';thefollowingexcepti

python - easy_install pycrypto 的问题

我正在尝试使用easy_install在osx上安装pycrypto,但出现以下错误:easy_installpycryptoSearchingforpycryptoReadinghttp://pypi.python.org/simple/pycrypto/Readinghttp://pycrypto.sourceforge.netReadinghttp://www.pycrypto.org/Readinghttp://www.amk.ca/python/code/cryptoBestmatch:pycrypto2.3Downloadinghttp://ftp.dlitz.net/pu

python - Django/PIL 错误 - 呈现 : The _imagingft C module is not installed 时捕获异常

我正在尝试在我的机器上运行一个网络应用程序/网站,它在OSX10.6.2上运行,但我遇到了一些问题:Caughtanexeptionwhilerending:The_imagingftCmoduleisnotinstalled在python中执行import_imagingft给我这个:>>>import_imagingftTraceback(mostrecentcalllast):File"",line1,inImportError:dlopen(/Library/Python/2.6/site-packages/PIL/_imagingft.so,2):Symbolnotfound