Closed moon6pence closed 8 years ago
What I do personally is like:
sudo apt-get install python-virtualenv python2.7-dev
virtualenv -p python2.7 ~/env27
source ~/env27/bin/activate
pip install -U pip
pip install -U wheel
pip install -U setuptools
pip install -U numpy
pip install -U docopt
source ~/torch/install/bin/torch-activate
git clone https://github.com/hughperkins/pytorch ~/pytorch
cd ~/pytorch
./build.sh
To what extent does this meet your requirements for your own system?
thanks moon6pence for the solution it worked for me
Addressed in 05b09e3 :
--user
Thank you Kyunghun and Sounak; I confess I didnt know about --user
before :-)
thanks moon6pence for the solution it worked for me
python setup.py install --user || exit 1 worked for me
If you're on windows just run cmd or power shell as administrator
When using virtualenv(no matter whether we have ||exit 1
):
$ source ~/py36/bin/activate
$ python setup.py install --user [|| exit 1]
...
...
running install_egg_info
running egg_info
error: [Errno 13] Permission denied
$ which python
/home/cmal/py36/bin/python
$ python --version
Python 3.6.12
$ which pip
/home/cmal/py36/bin/pip
$ pip -V
pip 20.0.2 from /home/cmal/py36/lib/python3.6/site-packages/pip (python 3.6)
I have python 2.7 which installed by default in Ubuntu 14.04 And torch is installed in my home directory.
When I run the script
build.sh
, there's permission denied error like below:This is obvious because
python setup.py install
tend to install below/usr/local/lib/python2.7
sudo ./build.sh
also fails because it cannot find the torch when I use sudo.My solution was update the last line of
build.sh
like this:pytorch package is installed below my home directory and it works well.
However, how do you install this package in general situation?