Code Monkey home page Code Monkey logo

Comments (2)

poswald avatar poswald commented on May 31, 2024

Yes, I can confirm that this is a problem and checking for an import and printing if missing is not really the normal way to do it. It's better to let the app blow up if the import is unsatisfied. I tested the fix in Issue #8 and it works.

from analytics-python.

ivolo avatar ivolo commented on May 31, 2024

Thanks guys! All merged in and virtualenv / pip installs should work. sorry about that.

ivolo:test ivolo$ virtualenv venv
New python executable in venv/bin/python
Installing setuptools............done.
Installing pip...............done.
ivolo:test ivolo$ source venv/bin/activate
(venv)ivolo:test ivolo$ python
Python 2.7.2 (default, Jun 16 2012, 12:38:40) 
[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.
>>> import analytics
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named analytics
>>> ^D
(venv)ivolo:test ivolo$ pip install analytics-python
Downloading/unpacking analytics-python
  Downloading analytics-python-0.3.7.tar.gz
  Running setup.py egg_info for package analytics-python

Downloading/unpacking requests (from analytics-python)
  Downloading requests-1.1.0.tar.gz (337kB): 337kB downloaded
  Running setup.py egg_info for package requests

Downloading/unpacking python-dateutil (from analytics-python)
  Downloading python-dateutil-2.1.tar.gz (152kB): 152kB downloaded
  Running setup.py egg_info for package python-dateutil

Downloading/unpacking six (from python-dateutil->analytics-python)
  Downloading six-1.2.0.tar.gz
  Running setup.py egg_info for package six

Installing collected packages: analytics-python, requests, python-dateutil, six
  Running setup.py install for analytics-python

  Running setup.py install for requests

  Running setup.py install for python-dateutil

  Running setup.py install for six

Successfully installed analytics-python requests python-dateutil six
Cleaning up...
(venv)ivolo:test ivolo$ python
Python 2.7.2 (default, Jun 16 2012, 12:38:40) 
[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.
>>> import analytics
>>> analytics.init('testsecret', async=False, flush_at=1)
>>> analytics.track('[email protected]', 'Testing Python 1')

from analytics-python.

Related Issues (20)

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.