StorjOld / downstream-farmer

Client software for a Storj farmer.
http://driveshare.org
MIT License
35 stars 16 forks source link

Warning if need root #19

Closed alphaonex86 closed 9 years ago

alphaonex86 commented 9 years ago

Hello, can you put warning if need start setup in root, but I prefer don't execute code in root: driveshare@driveshare ~ $ pip install -r requirements.txt . Unpacking /home/driveshare Running setup.py (path:/tmp/pip-4zt17h-build/setup.py) egg_info for package from file:///home/driveshare

Downloading/unpacking six (from -r requirements.txt (line 1)) Downloading six-1.8.0-py2.py3-none-any.whl Downloading/unpacking requests (from -r requirements.txt (line 2)) Downloading requests-2.5.0-py2.py3-none-any.whl (464kB): 464kB downloaded Downloading/unpacking base58 (from -r requirements.txt (line 3)) Downloading base58-0.2.1.tar.gz Running setup.py (path:/tmp/pip_build_driveshare/base58/setup.py) egg_info for package base58

Downloading/unpacking storj-heartbeat from git+https://github.com/Storj/heartbeat.git (from -r requirements.txt (line 5)) Cloning https://github.com/Storj/heartbeat.git to /tmp/pip_build_driveshare/storj-heartbeat Running setup.py (path:/tmp/pip_build_driveshare/storj-heartbeat/setup.py) egg_info for package storj-heartbeat

Downloading/unpacking RandomIO from git+https://github.com/Storj/RandomIO.git (from -r requirements.txt (line 6)) Cloning https://github.com/Storj/RandomIO.git to /tmp/pip_build_driveshare/RandomIO Running setup.py (path:/tmp/pip_build_driveshare/RandomIO/setup.py) egg_info for package RandomIO

Downloading/unpacking siggy from git+https://github.com/wiggzz/siggy.git (from -r requirements.txt (line 7)) Cloning https://github.com/wiggzz/siggy.git to /tmp/pip_build_driveshare/siggy Running setup.py (path:/tmp/pip_build_driveshare/siggy/setup.py) egg_info for package siggy

Downloading/unpacking pycrypto>=2.6.1 (from storj-heartbeat->-r requirements.txt (line 5)) Downloading pycrypto-2.6.1.tar.gz (446kB): 446kB downloaded Running setup.py (path:/tmp/pip_build_driveshare/pycrypto/setup.py) egg_info for package pycrypto

Downloading/unpacking pycoin (from siggy->-r requirements.txt (line 7)) Downloading pycoin-0.52.tar.gz (78kB): 78kB downloaded Running setup.py (path:/tmp/pip_build_driveshare/pycoin/setup.py) egg_info for package pycoin

Installing collected packages: six, requests, base58, storj-heartbeat, RandomIO, siggy, downstream-farmer, pycrypto, pycoin Cleaning up... Exception: Traceback (most recent call last): File "/usr/lib/python3.3/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python3.3/site-packages/pip/commands/install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) File "/usr/lib/python3.3/site-packages/pip/req.py", line 1435, in install requirement.install(install_options, global_options, _args, *_kwargs) File "/usr/lib/python3.3/site-packages/pip/req.py", line 671, in install self.move_wheel_files(self.source_dir, root=root) File "/usr/lib/python3.3/site-packages/pip/req.py", line 901, in move_wheel_files pycompile=self.pycompile, File "/usr/lib/python3.3/site-packages/pip/wheel.py", line 215, in move_wheel_files clobber(source, lib_dir, True) File "/usr/lib/python3.3/site-packages/pip/wheel.py", line 209, in clobber shutil.copy2(srcfile, destfile) File "/usr/lib/python3.3/shutil.py", line 243, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.3/shutil.py", line 110, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.3/site-packages/six.py'

Storing debug log for failure in /home/driveshare/.pip/pip.log

EmergentBehavior commented 9 years ago

If you're building from source, as opposed to using a binary, you can use a Python virtual environment to install the package in an isolated environment where you wouldn't need sudo.

alphaonex86 commented 9 years ago

I have missing it from the readme? But if (! root) warning should be useful.

EmergentBehavior commented 9 years ago

I can create a new issue to add venv instructions to README. A root warning wouldn't necessarily make sense, because if your user is an authorized 'sudoer' on your system and would have permission to write to /usr/lib/ you wouldn't need root, just sudo pip install.

alphaonex86 commented 9 years ago

Then, take warning when my user is not sudoer (and I don't have sudo...) should be more clear.

EmergentBehavior commented 9 years ago

Handled in #20