我可以通过pip install lxml
安装lxml,但我无法通过此document中提到的pip install lxml -t /path/to/dir
将其安装在所需的目录中。我的命令是否需要更多选项,或者lxml是否无法安装在其他目录中?
以下是安装失败后输出的消息:
Collecting lxml
Using cached lxml-3.6.0.tar.gz
Installing collected packages: lxml
Running setup.py install for lxml
Successfully installed lxml-3.6.0
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 246, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 395, in run
for item in os.listdir(lib_dir):
OSError: [Errno 2] No such file or directory: '/tmp/tmpzHnGVW/lib/python/'