Closed jbshirk closed 7 years ago
Hello,
can you please a little bit elaborate more on where you got stuck? magnetico is designed and tested on GNU/Linux and OS X has never been in the list honestly, but I think it should just work fine. I would be happy to help. =)
Me too. Typing "magneticod" says command not found. I've got python3.5 running with "python3". pip3 list shows:
jamie$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
appdirs (1.4.3)
magneticod (0.1.0)
pip (9.0.1)
setuptools (28.8.0)
I think the problem is that it installed to /Users/jamie/Library/Python/3.5/lib/python/site-packages/magneticod
And maybe, it's .bash_profile and not .bash_rc on Mac, but I'm not smart enough to figure out how to fix the path export thing. My complete .bash_rc file is:
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PATH=/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PATH=/Users/jamie/.node/bin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Setting PATH for Python 3.5
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH
PATH=/Users/jamie/Library/Python/3.5/lib/python/site-packages
I added that last line, thinking it might help, but no luck.
Thanks!
The installation worked for me. Use
PATH="${PATH}:${HOME}/Library/Python/3.5/bin/"
export PATH
in your .profile
.
However, magneticod
requires a small patch to work correctly:
diff --git a/magneticod/magneticod/bittorrent.py b/magneticod/magneticod/bittorrent.py
index 63b8995..a3c399b 100644
--- a/magneticod/magneticod/bittorrent.py
+++ b/magneticod/magneticod/bittorrent.py
@@ -33,7 +33,8 @@ class DisposablePeer:
self.__socket.setblocking(False)
# To reduce the latency:
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, True)
- self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, True)
+ if hasattr(socket, 'TCP_QUICKACK'):
+ self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, True)
res = self.__socket.connect_ex(peer_addr)
if res != errno.EINPROGRESS:
raise ConnectionError()
I plan to submit this as a PR soon. Submitted and merged #16 containing the above patch.
Fantastic, that worked for me, thanks @nneonneo !
Fixed in v0.2.0. =) Though, documentation needs to updated. Updated!
MacBook-Pro-3:~ joe$ pip3 install magneticod --user
Collecting magneticod
Downloading magneticod-0.1.0-py3-none-any.whl
Collecting appdirs>=1.4.3 (from magneticod)
Downloading appdirs-1.4.3-py2.py3-none-any.whl
Installing collected packages: appdirs, magneticod
Successfully installed appdirs-1.4.3 magneticod-0.1.0
MacBook-Pro-3:~ joe$
MacBook-Pro-3:~ joe$ export PATH="${PATH}:${HOME}/Library/Python/3.5/bin/"
MacBook-Pro-3:~ joe$ source ~/.profile
-bash: /Users/joe/.profile: No such file or directory
MacBook-Pro-3:~ joe$ magneticod
2017-04-15 05:47:38,232 INFO magneticod v0.1.0 started
2017-04-15 05:47:38,265 DEBUG SybilNode 2022FA60F789F83C129FE8A8E855B67EDEE18E2A initialized!
The installation worked for me. Use
PATH="${PATH}:${HOME}/Library/Python/3.5/bin/" export PATH
in your .profile.
The instructions should say where .profile is so that it can be edited.
When I do:
MacBook-Pro-3:~ joe$ pwd
/Users/joe
MacBook-Pro-3:~ joe$ ls -la .profile
ls: .profile: No such file or directory
MacBook-Pro-3:~ joe$
I cannot continue.
where I initially got stuck:
starting with where the installation is... I don't know.
Neither the instructions nor installer say WHERE the magneticod is installed. I was not able to find it in the usual places. Thank goodness that whatever changes were made led to the export path working, and magneticod starting.
Hi Guys, I'm a total noob at this. Can someone give me step by step instructions on what to type in mac os x terminal to install this?
starting with where the installation is... I don't know.