pip在anaconda环境下指定安装路径的安装问题
2018-01-04 15:24
741 查看
错误起因:
pip安装torchtext==0.1.1完成后,发现安装路径为.local/lib/python3.6/site-packages,但是我的程序需要使用python2.7。
一次改正:
指定pip安装路径重新安装$ pip install --user --install-option="-prefix=./.local/lib/python2.7" torchtext==0.1.1
安装不成功
/users4/zsun/anaconda3/lib/python3.6/site-packages/pip/commands/install.py:194: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Requirement already satisfied: torchtext==0.1.1 in /users4/zsun/.local/lib/python3.6/site-packages
Requirement already satisfied: requests in /users4/zsun/anaconda3/lib/python3.6/site-packages (from torchtext==0.1.1)
Requirement already satisfied: tqdm in /users4/zsun/.local/lib/python3.6/site-packages (from torchtext==0.1.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
Requirement already satisfied: idna<2.7,>=2.5 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
Requirement already satisfied: certifi>=2017.4.17 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
发现安装不成功 ,并可发现/anaconda3/lib/python3.6/site-packages/pip/commands/install.py为pip的安装目录。
我的anaconda是基于python3安装的,所以接下来
二次改正:
为我的anacoda添加python2 的环境,操作流程http://www.lqkweb.com/blog.php?id=86
安装好py27之后,source activate py27开启py27。(关闭:
此时find -name python2.7发现除了必须有的./.local/lib/python2.7还出现众多类似于./anaconda3/envs/py27/bin/python2.7的。
下一步重新尝试$ pip install --user --install-option="-prefix=./anaconda3/envs/py27/lib/python2.7" torchtext==0.1.1
安装成功。
pip安装torchtext==0.1.1完成后,发现安装路径为.local/lib/python3.6/site-packages,但是我的程序需要使用python2.7。
一次改正:
指定pip安装路径重新安装$ pip install --user --install-option="-prefix=./.local/lib/python2.7" torchtext==0.1.1
安装不成功
/users4/zsun/anaconda3/lib/python3.6/site-packages/pip/commands/install.py:194: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Requirement already satisfied: torchtext==0.1.1 in /users4/zsun/.local/lib/python3.6/site-packages
Requirement already satisfied: requests in /users4/zsun/anaconda3/lib/python3.6/site-packages (from torchtext==0.1.1)
Requirement already satisfied: tqdm in /users4/zsun/.local/lib/python3.6/site-packages (from torchtext==0.1.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
Requirement already satisfied: idna<2.7,>=2.5 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
Requirement already satisfied: certifi>=2017.4.17 in /users4/zsun/anaconda3/lib/python3.6/site-packages (from requests->torchtext==0.1.1)
发现安装不成功 ,并可发现/anaconda3/lib/python3.6/site-packages/pip/commands/install.py为pip的安装目录。
我的anaconda是基于python3安装的,所以接下来
二次改正:
为我的anacoda添加python2 的环境,操作流程http://www.lqkweb.com/blog.php?id=86
安装好py27之后,source activate py27开启py27。(关闭:
deactivate)
此时find -name python2.7发现除了必须有的./.local/lib/python2.7还出现众多类似于./anaconda3/envs/py27/bin/python2.7的。
下一步重新尝试$ pip install --user --install-option="-prefix=./anaconda3/envs/py27/lib/python2.7" torchtext==0.1.1
安装成功。
相关文章推荐
- tensorflow安装的时候,没有su权限,即使利用anaconda虚拟环境,pip仍没有权限的问题
- 解决pip安装的包无法在anaconda 的python 环境下使用的问题
- Python:Anaconda安装虚拟环境到指定路径
- 在同一台电脑机器上安装多个版本jdk,修改环境变量路径不生效的问题
- 解决Anaconda在指定虚拟环境下无法包的问题
- Anaconda 安装 tensorflow 环境下的 import 问题
- 关于java安装的环境路径问题
- JAVA环境配置---------jdk安装路径中存在空格的问题
- Python环境下安装pip 及常见问题
- anaconda环境下pip安装future
- 为指定的python环境(如anaconda)安装opencv的方法
- ROS环境下Anaconda和Python的路径问题
- Openoffice在redflag6下指定路径安装无法启动的问题
- anaconda 及python pip安装 类库等问题收集
- 以非root身份安装Python的Module或者Package以及pip安装指定路径
- 在win10环境下用pip安装xlrd 1.0.0的问题(python2.7)
- 【转啊转的啊】]关于“Web 创作组件” 解决MS Office 2007找不到Office.zh-cn问题以及VS2008 SP1 安装失败需指定visualwebdeveloperww.msi所在路径
- 解决安装驱动程序时提示“Windows已经找到设备的驱动程序,但在试图安装它时遇到错误”“系统找不到指定路径”问题。
- 【Tensorflow】 第三节 环境搭建一 Ubuntu16.04LTS安装Python/pip/ANACONDA
- 安装VS2005 SP1出现这样问题“windows 无法访问指定设备、路径或文件。您可能没有合适的权限访问这个项目。”