我正在尝试安装lxml以在我的Mac上安装scrapy(v 10.9.4)
??ishaantaylor@Ishaans-MacBook-Pro.local ~
??? pip install lxml
Downloading/unpacking lxml
Downloading lxml-3.4.0.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/private/var/folders/8l/t7tcq67d34v7qq_4hp3s1dm80000gn/T/pip_build_ishaantaylor/lxml/setup.py) egg_info for package lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
warning: no previously-included files found matching '*.py'
Installing collected packages: lxml
Running setup.py install for lxml
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
building 'lxml.etree' …Run Code Online (Sandbox Code Playgroud) 我在MacBook上为不同的项目安装了几个版本,现在才意识到这是一个错误.我用自制软件安装它,通过python的网站安装它(Python 2.7.8 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later [2]))和其他我不记得的方法.我正在运行10.9.4 OS X.
我想知道如何在我的计算机上找到所有python安装的位置,并删除除本机之外的所有依赖它们的包和包.我想从头开始而不重新安装我的操作系统.
另外,我想知道我是否可以应用相同的方法来查找所有pip相关文件.
更新:
which -a python给我每个可执行python的所有路径.有多个是正常的吗?
??ishaantaylor@Ishaans-MacBook-Pro.local ~
??? which -a python
/usr/bin/python
/usr/bin/python
/usr/bin/python
/usr/bin/python
/usr/bin/python
/usr/bin//python
/usr/bin//python
/usr/bin/python
Run Code Online (Sandbox Code Playgroud) git和github的新功能.
我想在本地和远程替换master我的其他分支的git 分支bridge.问题是git无法解析bridge分支的引用.问题来自推向github.
git树是如何形成的:
为了规避,我创建了另一个名为bridge的分支.我不喜欢我已将网桥设为默认设置,因此我尝试将其更改为主设备使用:
git checkout better_branch git merge --strategy=ours master # keep the content of this branch, but record a merge git checkout master git merge better_branch # fast-forward master up to the merge
它在当地工作.但是,当我试图推动时,我得到以下内容:
NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master) $ git push warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the …
尝试运行以下代码时出现属性错误:
import cv2
import cv2.cv as cv
import numpy as np
def main():
img = cv2.imread('images/g1.jpg',0);
print(img)
img = cv2.medianBlur(img,5)
cimg = cv2.cvtColor(img,cv2.COLOR_GRAY2BGR)
circles = cv2.HoughCircles(img, cv.HOUGH_GRADIENT, 1, 20, param1=50, param2=30, minRadius=0, maxRadius=0)
circles = np.uint16(np.around(circles))
for i in circles[0,:]:
# draw the outer circle
cv2.circle(cimg,(i[0],i[1]),i[2],(0,255,0),2)
# draw the center of the circle
cv2.circle(cimg,(i[0],i[1]),2,(0,0,255),3)
cv2.imshow('detected circles',cimg)
cv2.waitKey(0)
cv2.destroyAllWindows()
Run Code Online (Sandbox Code Playgroud)
我试图找到解决这个问题的方法,我用了cv2替换cv了
circles = cv2.HoughCircles(img, cv.HOUGH_GRADIENT, 1, 20, param1=50, param2=30, minRadius=0, maxRadius=0)
Run Code Online (Sandbox Code Playgroud)
但是,我仍然得到错误.