Nanoseb / ncTelegram

A ncurse Telegram client developed in Python
GNU General Public License v3.0
312 stars 25 forks source link

possible to run on osx? #35

Open prankousky opened 6 years ago

prankousky commented 6 years ago

hi all,

i am using macOS High Sierra v 10.13.4 on my macbook. python and python3 are installed via homebrew.

i git cloned this repository and tried to run python3 setup.py install (each command, i also tried running without the 3, both for python3 and pip3); this creates the following error message

$ python3 setup.py install                                                                                                                                                                                                      -- INSERT --
/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running install
running build
running build_py
error: package directory 'ncTelegram' does not exist

when i just run ncTelegram, i get this error

$ ./ncTelegram                                                                                                                                                                                                               -- INSERT --
Traceback (most recent call last):
  File "./ncTelegram2", line 9, in <module>
    import ncTelegram
ModuleNotFoundError: No module named 'ncTelegram'

this looks like a really great telegram client, which i would love to still use until i can make the final switch from osx to a linux distribution.

any help would be greatly appreciated :) thanks in advance for your support!

Nanoseb commented 6 years ago

Hi, The only issue on macos is that the file system is not case sensitive (https://github.com/Nanoseb/ncTelegram/issues/9). You will need to rename the file nctelegram. Alternatively you could install directly this fork: https://github.com/x0wllaar/ncTelegram , the only difference with this repository is the rename of this file. So it should work fine. Sorry for this, when writing nctelegram I didn't realise that would be an issue...

prankousky commented 6 years ago

Thank you! I tried this and got the following


$ ./nctelegram.py                                                                                                                                                                                                               -- INSERT --
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/psutil/_psosx.py", line 330, in wrapper
    return fun(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/psutil/_psosx.py", line 515, in connections
    rawlist = cext.proc_connections(self.pid, families, types)
PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./nctelegram.py", line 13, in <module>
    for connection in psutil.net_connections():
  File "/usr/local/lib/python3.6/site-packages/psutil/__init__.py", line 2108, in net_connections
    return _psplatform.net_connections(kind)
  File "/usr/local/lib/python3.6/site-packages/psutil/_psosx.py", line 249, in net_connections
    cons = Process(pid).connections(kind)
  File "/usr/local/lib/python3.6/site-packages/psutil/_psosx.py", line 335, in wrapper
    raise AccessDenied(self.pid, self._name)
psutil._exceptions.AccessDenied: psutil.AccessDenied (pid=55974)

so then i tried running as root

$ sudo ./nctelegram.py                                                                                                                                                                                                          -- INSERT --
Password:
telegram: unrecognized option `--permanent-peer-ids'
Traceback (most recent call last):
  File "./nctelegram.py", line 93, in <module>
    ncTelegram.Telegram_ui(config_full)
  File "/Users/me/dotfiles/gits/ncTelegram/ncTelegram/__init__.py", line 39, in __init__
    self.start_Telegram()
  File "/Users/me/dotfiles/gits/ncTelegram/ncTelegram/__init__.py", line 187, in start_Telegram
    pubkey_file=PATH_PUBKEY)
  File "/usr/local/lib/python3.6/site-packages/pytg/__init__.py", line 52, in __init__
    raise AssertionError("CLI Process died.")
AssertionError: CLI Process died.
urielz commented 6 years ago

I ran into the same issue on macOS 10.13.6. This looks like the source of the problem: https://github.com/giampaolo/psutil/issues/1219