Code Monkey home page Code Monkey logo

pyeccarithmetic's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyeccarithmetic's Issues

Package installs as 'pyECCArithmetic' on macOS and import fails

Note the lower-case 'p' at the start of the package name. This leads to the from pyECCArithmetic.x import Y statements in __init__.py to fail. The error manifests itself as follows:

~ python --version
Python 3.7.3
➜  ~ virtualenv --version
16.4.1
➜  ~~ virtualenv /tmp/venv
Using base prefix '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7'
New python executable in /tmp/venv/bin/python3.7
Also creating executable in /tmp/venv/bin/python
Installing setuptools, pip, wheel...
done.
➜  ~ source /tmp/venv/bin/activate
(venv) ➜  ~ pip install PyECCArithmetic
Collecting PyECCArithmetic
  Using cached https://files.pythonhosted.org/packages/76/39/ecf93d5bc45d70f77084d02e9eb8aba5acf73b61aebac55a67265c3dc7a1/PyECCArithmetic-1.0.1-py3-none-any.whl
Installing collected packages: PyECCArithmetic
Successfully installed PyECCArithmetic-1.0.1
(venv) ➜  ~ pip list
Package         Version
--------------- -------
pip             19.2.1 
PyECCArithmetic 1.0.1  
setuptools      41.0.1 
wheel           0.33.4 
(venv) ➜  ~
(venv) ➜  ~ echo "Upper-case 'P' as per documentation"
Upper-case 'P' as per documentation
(venv) ➜  ~ python -c "import PyECCArithmetic; print('Success?')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PyECCArithmetic'
(venv) ➜  ~ echo "Lower-case 'p' like the package was installed"
Lower-case 'p' like the package was installed
(venv) ➜  ~ python -c "import pyECCArithmetic; print('Success?')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/venv/lib/python3.7/site-packages/pyECCArithmetic/__init__.py", line 4, in <module>
    from PyECCArithmetic.point import Point
ModuleNotFoundError: No module named 'PyECCArithmetic'
(venv) ➜  ~ l /tmp/venv/lib/python3.7/site-packages/               
total 8
drwxr-xr-x  13 bjarni  wheel   416B Jul 24 17:32 .
drwxr-xr-x  59 bjarni  wheel   1.8K Jul 24 17:32 ..
drwxr-xr-x   8 bjarni  wheel   256B Jul 24 17:32 PyECCArithmetic-1.0.1.dist-info
drwxr-xr-x   3 bjarni  wheel    96B Jul 24 17:32 __pycache__
-rw-r--r--   1 bjarni  wheel   126B Jul 24 17:32 easy_install.py
drwxr-xr-x   7 bjarni  wheel   224B Jul 24 17:32 pip
drwxr-xr-x   9 bjarni  wheel   288B Jul 24 17:32 pip-19.2.1.dist-info
drwxr-xr-x   7 bjarni  wheel   224B Jul 24 17:32 pkg_resources
drwxr-xr-x   7 bjarni  wheel   224B Jul 24 17:32 pyECCArithmetic
drwxr-xr-x  42 bjarni  wheel   1.3K Jul 24 17:32 setuptools
drwxr-xr-x  11 bjarni  wheel   352B Jul 24 17:32 setuptools-41.0.1.dist-info
drwxr-xr-x  12 bjarni  wheel   384B Jul 24 17:32 wheel
drwxr-xr-x   9 bjarni  wheel   288B Jul 24 17:32 wheel-0.33.4.dist-info

By manually editing the import statements in the __init__.py file I'm able to use the library:

(venv) ➜  ~ sed -i -e 's/PyECCArithmetic/pyECCArithmetic/g' /tmp/venv/lib/python3.7/site-packages/pyECCArithmetic/__init__.py
(venv) ➜  ~ cat /tmp/venv/lib/python3.7/site-packages/pyECCArithmetic/__init__.py
# coding=utf-8
name = "pyECCArithmetic"

from pyECCArithmetic.point import Point
from pyECCArithmetic.curve import Curve
from pyECCArithmetic.error import PointsOnDifferentCurveError


__all__ = ['Point', 'Curve', 'PointsOnDifferentCurveError']
(venv) ➜  ~ python -c "import pyECCArithmetic; print('Success?')"
Success?

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.