How to install pync on mac - python

I want to install pync on mac for showing notification. I tried with
$ pip install pync
git clone git://github.com/SeTeM/pync.git
cd pync
python setup.py install
sudo easy_install pync
Showing error as :
Last login: Thu Nov 21 12:20:51 on ttys000
fiss-Mac:~ fis$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pync import Notifier
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.8-intel/egg/pync/__init__.py", line 3, in <module>
File "build/bdist.macosx-10.8-intel/egg/pync/TerminalNotifier.py", line 99, in <module>
File "build/bdist.macosx-10.8-intel/egg/pync/TerminalNotifier.py", line 27, in __init__
Exception: pync was not properly installed. Head over to https://github.com/SeTeM/pync/ and file a bug.
>>>

You should try pip3 install pync as pip3 works for mac rather than just pip . That is what you should try . If that doesn't work - then you should try to install it from the GitHub link like said in one of the above answers . Hope I was Helpful !! (:

It seems that the package for pync in the Python Package Index does not work properly.
Installing directly from the pync github repo will resolve the issue:
pip install git+https://github.com/SeTeM/pync.git

Just had the same issue.
Unzipping the egg file helped to solve the issue:
cd /Library/Python/2.7/site-packages
sudo unzip pync-1.4-py2.7.egg
sudo rm -r EGG-INFO pync-1.4-py2.7.egg
$ python
Python 2.7.6 (default, Nov 12 2013, 13:26:39)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pync import Notifier
>>>

Related

Install graph-tool for Anaconda Python3.6.3 on macOS X

How can I install graph-tool for Anaconda Python 3.6.3 on macOS High Sierra? (I've been able to install graph-tool for Python 2.7.10.) Thanks!
I followed the instructions and first tried
brew tap homebrew/science
but got "Error: homebrew/science was deprecated. This tap is now empty as all its formulae were migrated." Anyhow, I found a solution (forgot the exact brew command) and ran
brew install graph-tool
It now says "Warning: brewsci/science/graph-tool 2.26_1 is already installed". I can then import graph-tool from python 2.7,
$ /usr/bin/python2.7
>>> from graph_tool.all import *
but not from the anaconda distribution,
$ python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 6 2017, 12:04:38)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from graph_tool.all import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'graph_tool'

Installing Mesos from Mesosphere yum repository

I am trying to install Mesos to in my container (CentOS 7) to have the Mesos libraries installed for my scheduler (python).
I followed 'Installing Mesos packages' section in https://open.mesosphere.com/downloads/mesos/
After successfully running:
$ rpm -Uvh http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-3.noarch.rpm
$ yum -y install --enablerepo=mesosphere mesos
$ pip install protobuf
I see Mesos packages in pip
However, from python, I cannot import Mesos scheduler driver:
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from mesos.interface import Scheduler
>>> from mesos.native import MesosSchedulerDriver
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/mesos/native/__init__.py", line 18, in <module>
from mesos.scheduler import MesosSchedulerDriver
File "/usr/lib/python2.7/site-packages/mesos/scheduler/__init__.py", line 17, in <module>
from ._scheduler import MesosSchedulerDriverImpl as MesosSchedulerDriver
ImportError: /usr/lib/python2.7/site-packages/mesos/scheduler/_scheduler.so: undefined symbol: svn_txdelta2
Any ideas?
Well, I'm not an expert on this, but I think the packages don't install the development dependencies. Have a look at http://mesos.apache.org/gettingstarted/
In your case, you seem to miss a SVN library.

Installing rpm and yum in anaconda python on centos 7

How do I install the redhat yum packages within an anaconda environment on CentOS? These packages exist in the standard Centos dist:
$ lsb_release -d
Description: CentOS Linux release 7.3.1611 (Core)
$ python
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
Type "help", "copyright", "credits" or "license" for more information.
>>> import rpm
>>> import yum
>>> print(rpm.__package__, rpm.__file__, rpm.__path__,rpm.__version__)
('rpm', '/usr/lib64/python2.7/site-packages/rpm/__init__.pyc', ['/usr/lib64/python2.7/site-packages/rpm'], '4.11.3')
>>> print(yum.__package__, yum.__file__, yum.__path__,yum.__version__)
('yum', '/usr/lib/python2.7/site-packages/yum/__init__.pyc', ['/usr/lib/python2.7/site-packages/yum'], '3.4.3')
I can't find similar packages (in the ways that I know) for anaconda:
$ source anaconda3/bin/activate python2.7
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import rpm;
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named rpm
>>> import yum
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named yum
>>>
pip and conda search don't seem to have these packages either.
When you run source
anaconda3/bin/activate python2.7
you are running python2.7 using a different virtual environment, where the package repository is different. You should source into the venv and install the packages there.

How do I get Python to see libtorrent-rasterbar in mac os?

I try to install libtorrent-rasterbar, but Python does not see the module. The El Captaine system. Tell me where to look?
andrew: ~ $ brew install python3
Warning: python3-3.6.0_1 already installed
andrew: ~ $ brew install libtorrent-rasterbar
Warning: libtorrent-rasterbar-1.1.1 already installed
andrew: ~ $ python
Python 3.6.0 (default, Mar 4 2017, 12:32:37)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import libtorrent
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'libtorrent'
>>>
For python2 it work: https://gist.github.com/jacobzelek/ecb6e98feb91d911e231
May be for python3 is similarly

Error with pylibmc on Mac OS Lion

I have a problem with pylibmc on Mac OS Lion.
libmemcached — 1.0.4
pylibmc — 1.2.3
$ python
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylibmc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pylibmc/__init__.py", line 70, in <module>
import _pylibmc
ImportError: dlopen(/Library/Python/2.7/site-packages/_pylibmc.so, 2): Symbol not found: _memcached_add
Referenced from: /Library/Python/2.7/site-packages/_pylibmc.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/_pylibmc.so
But it works with sudo!
$ sudo python
Password:
Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylibmc
>>>
Any ideas?
Installation in 32-bit mode solved the problem.
You need to install libevent in 32-bit mode
brew install --universal libevent
Next to download libmemcached source (1.0.8 version works for me) and configure force for 32 bit arch:
./configure --build=i386-apple-darwin11.4.2 "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
make
sudo make install
where 11.4.2 is the version of kernel
Reinstall pylibmc
sudo pip uninstall pylibmc
sudo pip install pylibmc
Now it works
$ python -c 'import pylibmc'
$
Looks like a build and/or installation problem with libmemcached. Maybe you can check out issue #101? https://github.com/lericson/pylibmc/issues/101

Categories

Resources