我遇到了将xbrl模块安装到python的问题,它困扰了我两天而且我还没有解决它。我成功安装了pip。我在安装lxml
时遇到了同样的问题https://pypi.python.org/pypi/python-xbrl/1.0.7
当我使用:$ sudo pip install python-xbrl,我得到了
Downloading/unpacking python-xbrl
Downloading python-xbrl-1.0.7.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/python-xbrl/setup.py) egg_info for package python-xbrl
Installing collected packages: python-xbrl
Running setup.py install for python-xbrl
changing mode of build/scripts-2.7/xbrl.py from 644 to 755
changing mode of /usr/local/bin/xbrl.py to 755
Successfully installed python-xbrl
Cleaning up...
我认为它已成功安装,但是,当我导入xbrl时,它不起作用
$python
>>> import xbrl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named xbrl
我也尝试使用pip安装lxml,但在清理时总是出错:
...
copying vvv/bzrlib/README.txt -> build/lib/vvv/bzrlib
running install_lib
creating /Library/Python/2.7/site-packages/ghettoci
error: could not create '/Library/Python/2.7/site-packages/ghettoci': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/kn/mmhj7w0n54s4b2jr08sx46kr0000gn/T/pip_build_youweizhu/vvv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/kn/mmhj7w0n54s4b2jr08sx46kr0000gn/T/pip-sGfgXW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/kn/mmhj7w0n54s4b2jr08sx46kr0000gn/T/pip_build_youweizhu/vvv
Storing debug log for failure in /Users/youweizhu/Library/Logs/pip.log
我在安装大多数模块时始终遇到同样的问题。经过30个小时的尝试,我很绝望。所以请帮助我。谢谢!