我的Mac上有两个版本的Python:
一个被苹果预装的人 /usr/bin
一个来自python.org /Library/Frameworks/Python.framework/Versions/2.6
Easy_install始终安装 /usr/bin 对于一些不经受过敏的原因
所以我明确地现在安装Easy_install:
sh setuptools-0.6c11-py2.6.egg --install-dir=/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
现在我想要Easy_install pip和....:
Searching for pip
Best match: pip 0.8
Processing pip-0.8-py2.6.egg
pip 0.8 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
error: /usr/local/bin/pip: Permission denied
我的道路和pythonpath:
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH
PYTHONPATH="/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages"
export PYTHONPATH
对不起,我真的不明白。
我究竟做错了什么。
我只想在框架Python目录中定期安装模块
难以判断您的安装基于所提供的信息的状态。 /usr/local/bin 是Apple提供的默认安装位置 /usr/bin/easy_install 所以,很可能,你是以某种方式调用它而不是 easy_install 应该通过运行来安装这一点 sh setuptools... 脚本。没有必要使用 --install-dir param对setuptools也没有设置 PYTHONPATH 指向框架Site-Packages目录;这会自动发生。你不应该修改 PATH 变量两次,只需使用第一个路径和导出。
从Python.org安装程序和新终端会话开始从新安装的Python 2.6.5开始,这是整个序列:
$ curl -O http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 325k 100 325k 0 0 125k 0 0:00:02 0:00:02 --:--:-- 136k
$ PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
$ export PATH
$ echo $PATH
/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
$ which python2.6
/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
$ python2.6 -c "import sys;print(sys.version_info)"
(2, 6, 5, 'final', 0)
$ sh setuptools-0.6c11-py2.6.egg
Processing setuptools-0.6c11-py2.6.egg
Copying setuptools-0.6c11-py2.6.egg to /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.6/bin
Installing easy_install-2.6 script to /Library/Frameworks/Python.framework/Versions/2.6/bin
Installed /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
$ which easy_install
/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install
$ easy_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://pip.openplans.org
Best match: pip 0.8
Downloading http://pypi.python.org/packages/source/p/pip/pip-0.8.tar.gz#md5=468d9adc309f33ad51cee38f0d455429
Processing pip-0.8.tar.gz
Running pip-0.8/setup.py -q bdist_egg --dist-dir /var/folders/Ux/UxzFPTCnF3esOnKQ1d3bbE+++TI/-Tmp-/easy_install-JU05mJ/pip-0.8/egg-dist-tmp-zwrzwI
warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 0.8 to easy-install.pth file
Installing pip script to /Library/Frameworks/Python.framework/Versions/2.6/bin
Installing pip-2.6 script to /Library/Frameworks/Python.framework/Versions/2.6/bin
Installed /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.8-py2.6.egg
Processing dependencies for pip
Finished processing dependencies for pip
$ pip --version
pip 0.8 from /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.8-py2.6.egg (python 2.6)
如果对python安装不太熟悉,可以先安装python。如何安装python 问题背景: 我是把python2.7安装在D盘下DOWNLOADS,然后是python2.7的。即D:\Downloads\python2.7 然后在其中也安装好了 pip 和 easy_install了,这两者都是在D:\Downloads\python2.7\Scripts。 但是在cmd中运行,总是说...
我们使用Django、flask等来操作MySQL,实际上底层还是通过Python来操作的。因此我们想要用Django来操作MySQL,首先还是需要安装一个驱动程序。在Python3中,驱动程序有多种选择。比如有pymysql以及mysqlclient等。 常见的Mysql驱动介绍: MySQL-python:也就是MySQLdb。是对C语言操作MySQL数据库的一个简单封装。遵循了Python ...
有时我们要用pip install 安装一些包,一个一个的安装感觉有点麻烦, 那我么如何高效的安装完呢?可以参考以下步骤 1、把需要安装的包的名称以及版本放在一个txt文件里, 看一下要安装的包的名称以及版本(版本没指定,就默认是最新的):type filename 2、输入:pip install -r F:\package.txt -i https://mirrors.a...
一. mac系统本身带有python环境 查看方式及版本: 1.进入terminal ,输入 python,效果如下,证明python环境已存在,版本为2.7.16 那我们简单输出一个hello world ,与c语言一样使用print 就可以打印字符串 二.windows环境安装 1.去https://ww...
ModuleNotFoundError: No module named 'wxpy' 环境问题 假设工程名称wxpy File->settings->project wxpy->Python Interpreter 查看是否有 wxpy 没有的话 点击+在输入框里输入 wxpy搜索,点击后安装 提示安装成功就OK! ...
Contents 1 What is Python? 1.1 Definition 2 Install Python 3 Install the code editor. 3.1 Install Pycharm 3.2 Install VScode 1 What is Python? 1.1 Definition Python is an interpreted, high-level and g...
大家好,这里是石侃侃的博客,欢迎前来讨论 这篇文章介绍的是DHT11在2440上的基于Qt5.6的应用 基于单片机系统的温湿度监测系统构成框图如图2-1所示。 图2-1 系统构成框图 该系统采用单片机s3c2440作为了本设计的核心元件。利用LCD作为了显示器件,利用触摸屏作为用户界面输入设备,第一行显示当前实时的温度,湿度,第二行依次显示历史时刻最高的温度值,最高的湿度值。第三行是一...
“Could not open/create prefs root node Software\JavaSoft\Prefs atroot 0x80000002. Windows RegCreateKeyEx(...) returned error code 5”, 虽然不影响tomcat的运行,程序也可以正常运行,但是既然报错肯定有隐患,于是决定解决这个问题。 此问题已纠...
参考:https://blog.csdn.net/lvxiangan/article/details/78931962...
I have trained TensorFlow Object Detection API on my own PascalVOC dataset with 7 classes. In each class there are from 100 to 200 images. I was using ssd_mobilenet_v1_pets.config standard configurati...
How can I indent a line by several steps in VIM? To understand my question, see the example blow: >> indents the current line by one step. 2>> indents two lines by one step Or V2> inden...
Is there any way to refer to a group of methods in Java 8, which varies their signature the overloading way? More precisely, I'd like this code to work: I cannot afford to add public static void foo (...
So I'm working on an application in Python with Tkinter as the GUI framework. The first picture is a screenshot from my coworkers computer, the second is a screenshot from my computer. How can I make ...
I'm facing problems to use Analytics in my Android App. I'm using the default class generated by Android Studio I don't know how to initialize it, if I do it in the MainActivity in onCreate() each tim...