服务器没有管理权限怎么安装pytorch

服务器没有管理权限怎么安装pytorch

或许连home目录也没有

作为普通用户,通常是没有管理员权限的,甚至连自己的home目录都没有

假设自己只能在/export/terry下写入文件

我在自己的目录安装了Anaconda3-5.3.0-Linux-x86_64.sh,而且配置了环境变量

export PATH=/export/terry/anaconda3/bin:$PATH

但conda安装仍然不能用(因为没有home目录)


terry@gpu6:/$ conda install torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
Solving environment: failed

NotWritableError: The current user does not have write permissions to a required path.
  path: /home/terry/.conda/pkgs/urls.txt
  uid: 582
  gid: 585

If you feel that permissions on this path are set incorrectly, you can manually
change them by executing

  $ sudo chown 582:585 /home/terry/.conda/pkgs/urls.txt

In general, it's not advisable to use 'sudo conda'.

好在pip还可以用,不过直接pip install pytorch也不行,文件只会下载到其他人的目录,然后无法打开读取,无法安装

所以要使用,可以同时加上-i换成清华源

pip download torch -d /export/terry -i https://pypi.tuna.tsinghua.edu.cn/simple/

然后使用本地安装方法安装

pip install "/export/terry/torch-1.7.1-cp37-cp37m-manylinux1_x86_64.whl"

MobaXterm可以右键复制绝对路径

进python环境验证

Python 3.7.0 (default, Jun 28 2018, 13:15:42)
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.7.1'

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值