GithubHelp home page GithubHelp logo

hearot / primecount-python Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 17 KB

A Python wrapper for primecount.

Home Page: https://pypi.org/project/primecount

License: BSD 2-Clause "Simplified" License

C 49.87% Python 50.13%
c c-module computation extension primecount python python3 primes mathematics maths

primecount-python's Introduction

hearot

Telegram Badge Discord Badge Linkedin Badge Email Badge Anilist Badge

✨ よ! ✨

I'm Gabriel, but you can call me hearot. This username has no real meaning, since plenty of people have asked me (nay, it does not come from beowulf either); it's just a random name I made up when I was a kid. I live near Florence, Italy.

I study Mathematics at the University of Pisa. I enjoy playing some videogames, but I wouldn't call myself a gamer. I'm a big fan of Formula 1 and Ferrari, by the way.

I'm an old fan of Telegram, which explains why I'm using it all the time. You can text me there! In fact, my first script was a Telegram bot that I wrote in PHP. Then, I fell in love with Python!

primecount-python's People

Contributors

hearot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

utmcontent

primecount-python's Issues

libprimecount.so.6: cannot open shared object file: No such file or directory

Hi. When I try to perform the installation on a linux machine using your instruction, and then import the primecount in python, I get an error:
>>> import primecount
libprimecount.so.6: cannot open shared object file: No such file or directory

primecount works fine from the console though:
$ primecount 100
25

I read the https://github.com/kimwalisch/primecount/blob/master/doc/BUILD.md and tried to perform installation differently, with no luck:
sudo cmake . -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON (default)
sudo make -j
sudo make instal

and also
sudo cmake . -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON (recommended here)

and also...
sudo cmake . -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF

I see the libprimecount.so.6 symlink, so I don't know what's the problem...

-rw-r--r-- 1 root root 688K Dec  9 13:46 /usr/local/lib/libprimecount.a
lrwxrwxrwx 1 root root   18 Dec 10 20:18 /usr/local/lib/libprimecount.so -> libprimecount.so.6
lrwxrwxrwx 1 root root   20 Dec 10 20:18 /usr/local/lib/libprimecount.so.6 -> libprimecount.so.6.2
-rw-r--r-- 1 root root 378K Dec  9 21:43 /usr/local/lib/libprimecount.so.6.2
-rw-r--r-- 1 root root 369K Dec  9 13:46 /usr/local/lib/libprimesieve.a
lrwxrwxrwx 1 root root   18 Dec 10 20:18 /usr/local/lib/libprimesieve.so -> libprimesieve.so.9
lrwxrwxrwx 1 root root   22 Dec 10 20:18 /usr/local/lib/libprimesieve.so.9 -> libprimesieve.so.9.6.0
-rw-r--r-- 1 root root 231K Dec  9 21:43 /usr/local/lib/libprimesieve.so.9.6.0

I also tried adding /usr/local/lib/ folder to the dynamic libraries environment variable, with no effect:
os.environ["LD_LIBRARY_PATH"] = os.environ.get("LD_LIBRARY_PATH", "") + ":/usr/local/lib/"
or simply:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/

For now I resorted to a barbaric:
int(subprocess.check_output(['primecount', str(n)]).decode())

Please, help me out!

OS: Linux 41f77423bea7 3.10.0-1127.18.2.el7.x86_64 #1 SMP Sun Jul 26 15:27:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
primecount version: 6.2
python version: 3.7.4
cmake version: 3.14.0

PyPI: source and additional wheels

This library was very useful for me - thanks for making it!

I noticed that the only distributions on PyPI are for CPython 3.6.

It would be great if you could publish wheels for the other supported versions of Python (currently 3.6, 3.7, 3.8, and 3.9) as well as a source package.

Please rename repo to primecount-python

Hi Gabriel,

Could you please rename this repo to primecount-python? It will be easier to find your repo using Google and it will also be easier for myself to create a bindings section in primecount's README.md which lists all bindings. Note that the pypi project name does not need to be renamed, it is nice if users can install it using pip install primecount.

Thanks,
Kim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.