在安装pip和python时,我遇到了一个说:
目录'/ Users/Parthenon/Library/Logs/pi'或其父目录不归当前用户所有,并且已禁用调试日志.请检查该目录的权限和所有者.如果用sudo执行pip,你可能需要-H标志.
因为我现在必须安装使用sudo.
我已经在我的Mac上安装了python和一些库,我正在运行Yosemite.我最近不得不做一个干净的擦拭,然后重新安装操作系统.现在我收到了这个提示,我无法弄清楚如何改变它
在我的命令行Parthenon$现在之前它是Philips-MBP:~ Parthenon$
我是这台电脑的唯一所有者,这是唯一的帐户.这似乎是一个问题,当升级到python 3.4,似乎没有什么在正确的地方,virtualenv不会去我想象的地方,等等.
我正在尝试设置Django.
当我运行时pip install -r requirements.txt,我得到以下异常:
Installing collected packages: amqp, anyjson, arrow, beautifulsoup4, billiard, boto, braintree, celery, cffi, cryptography, Django, django-bower, django-braces, django-celery, django-crispy-forms, django-debug-toolbar, django-disqus, django-embed-video, django-filter, django-merchant, django-pagination, django-payments, django-storages, django-vote, django-wysiwyg-redactor, easy-thumbnails, enum34, gnureadline, idna, ipaddress, ipython, kombu, mock, names, ndg-httpsclient, Pillow, pyasn1, pycparser, pycrypto, PyJWT, pyOpenSSL, python-dateutil, pytz, requests, six, sqlparse, stripe, suds-jurko
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", …Run Code Online (Sandbox Code Playgroud) 我正在尝试升级setuptools.实际上,我正在尝试升级ansible,但它正在尝试升级setuptools并失败.试图自己做也失败了.即使尝试卸载它也会失败
$ sudo -H pip install --upgrade setuptools
Collecting setuptools
Using cached setuptools-18.4-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 1.1.6
Uninstalling setuptools-1.1.6:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
root=options.root_path,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line …Run Code Online (Sandbox Code Playgroud) 我根据亚马逊的官方指示安装了aws cli.
sudo pip install awscli
Run Code Online (Sandbox Code Playgroud)
然而,aws在我的道路上无处可寻.安装似乎很成功.有许多文件位于/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/awscli,但没有名称的可执行文件aws.我的python版本是3.3.4,我的pip版本是1.5.4,并在OS X 10.9上运行此命令.可能有什么不对?
谢谢!
好的,所以我已经酿造了,自从El Capitan以来我就重新推出了重新安装的python.
MacBook-Pro-2:decipher Alex$ which python
/usr/local/bin/python
MacBook-Pro-2:decipher Alex$ whereis python
/usr/bin/python
Run Code Online (Sandbox Code Playgroud)
我有两个蟒蛇.这一切都很好.Brew医生很干净,除了在/ usr/local/include中找到一些Unbrewed头文件,其中没有一个看起来与Python有关.没有virtualenv,有没有办法再安装包?我觉得我可能会遗漏一些东西.
就像这个人我试图获得IPython一样.我真的不需要它,所以有一天我放弃了.现在我需要Pylint.如果我尝试用pip安装它:
IOError: [Errno 13] Permission denied: '/lib/python2.7/site-packages/logilab_common-1.1.0-py2.7-nspkg.pth'
Run Code Online (Sandbox Code Playgroud)
有没有人知道如何在我的系统上指向另一个python实例,或者做其他事情以便我可以恢复旧的行为?请?
- 编辑 -
建议使用/ usr/local/bin/pip来安装ipython.这是输出.我还想不通如何使用ipython.
MacBook-Pro-2:MNIST Alex$ /usr/local/bin/pip install ipython[all]
Requirement already satisfied (use --upgrade to upgrade): ipython[all] in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): traitlets in /usr/local/bin (from ipython[all])
Requirement already satisfied (use --upgrade to upgrade): pickleshare in /usr/local/bin (from ipython[all])
Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in /usr/local/bin (from ipython[all])
... …Run Code Online (Sandbox Code Playgroud) 文档位于:https : //pythonhosted.org/jira/#installation
它说:安装 jira-python 的最简单(也是最好)的方法是通过 pip:
$ pip install jira 这将处理客户端本身以及要求。
当我尝试时,我收到消息:
pip install jira
Collecting jira
Using cached jira-1.0.3-py2.py3-none-any.whl
Collecting six>=1.9.0 (from jira)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting requests-oauthlib>=0.3.3 (from jira)
Using cached requests_oauthlib-0.6.1-py2.py3-none-any.whl
Collecting requests-toolbelt (from jira)
Using cached requests_toolbelt-0.6.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=2.6.0 in /Library/Python/2.7/site-packages (from jira)
Collecting tlslite>=0.4.4 (from jira)
Using cached tlslite-0.4.9.tar.gz
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.3.3->jira)
Using cached oauthlib-1.0.3.tar.gz
Installing collected packages: six, oauthlib, requests-oauthlib, requests-toolbelt, tlslite, jira
Found existing …Run Code Online (Sandbox Code Playgroud) 我正在尝试在MacOS上配置apache-spark.所有在线指南要求下载火花焦油并设置一些env变量或使用brew install apache-spark然后设置一些env变量.
现在我用apache-spark安装了brew install apache-spark.我pyspark在终端运行,我得到一个python提示,表明安装成功.
现在,当我尝试import pyspark进入我的python文件时,我正面临着错误的说法ImportError: No module named pyspark
我无法理解的最奇怪的事情是它如何启动pyspark的REPL并且无法将模块导入python代码.
我也尝试过,pip install pyspark但它也无法识别模块.
除了用自制软件安装apache-spark之外,我还设置了以下env变量.
if which java > /dev/null; then export JAVA_HOME=$(/usr/libexec/java_home); fi
if which pyspark > /dev/null; then
export SPARK_HOME="/usr/local/Cellar/apache-spark/2.1.0/libexec/"
export PYSPARK_SUBMIT_ARGS="--master local[2]"
fi
Run Code Online (Sandbox Code Playgroud)
请在我的本地计算机上运行pyspark代码,建议我的设置缺少什么.
python ×6
pip ×4
macos ×3
apache-spark ×1
install ×1
jira ×1
osx-yosemite ×1
permissions ×1
pyspark ×1
python-2.7 ×1
python-jira ×1
setuptools ×1
sudo ×1