Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issues #66

Closed
nelsonam opened this issue Jun 27, 2017 · 5 comments
Closed

Installation Issues #66

nelsonam opened this issue Jun 27, 2017 · 5 comments

Comments

@nelsonam
Copy link

Hello,

I recently installed Clarifai from pip (I tried this on both python 2.7 and 3.5).

I am trying to follow the code sample here: https://developer.clarifai.com/quick-start/ (The python one)

When I run from clarifai.rest import ClarifaiApp I receive this error:

>>> from clarifai.rest import ClarifaiApp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/site-packages/clarifai/rest/__init__.py", line 3, in <module>
    from .client import ApiClient, ApiError, UserError, TokenError
  File "/usr/local/lib/python3.5/site-packages/clarifai/rest/client.py", line 19, in <module>
    from past.builtins import basestring
  File "/usr/local/lib/python3.5/site-packages/past/__init__.py", line 89, in <module>
    from future import __version__, __copyright__, __license__
ImportError: cannot import name '__version__'

What should I do to resolve this?

@jaredl531
Copy link
Contributor

jaredl531 commented Jun 28, 2017

Hi @nelsonam! Do you receive the same exact error when you try this on 2.7?

@robertwenquan
Copy link
Contributor

@nelsonam It looks like your env has something wrong with the past package. That lib comes with the native python so I am not exactly sure what happened.

Could you help verify if it works with a fresh virtualenv like below?

➜  ~ virtualenv -p python3.5 bb
Running virtualenv with interpreter /usr/local/bin/python3.5
Using base prefix '/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5'
New python executable in /Users/robertwen/bb/bin/python3.5
Also creating executable in /Users/robertwen/bb/bin/python
. bb/Installing setuptools, pip, wheel...done.
➜  ~ . bb/bin/activate
(bb) ➜  ~ pip freeze

(bb) ➜  ~ pip install clarifai
Collecting clarifai
  Downloading clarifai-2.0.29.tar.gz
Collecting future==0.15.2 (from clarifai)
Collecting requests==2.13.0 (from clarifai)
  Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting configparser==3.5.0 (from clarifai)
Collecting jsonschema==2.5.1 (from clarifai)
  Using cached jsonschema-2.5.1-py2.py3-none-any.whl
Collecting Pillow==2.9.0 (from clarifai)
Building wheels for collected packages: clarifai
  Running setup.py bdist_wheel for clarifai ... done
  Stored in directory: /Users/robertwen/Library/Caches/pip/wheels/f7/86/34/f0e2540fc31c2550ffb902f87a5973af2e9f31dd4f6675f818
Successfully built clarifai
Installing collected packages: future, requests, configparser, jsonschema, Pillow, clarifai
Successfully installed Pillow-2.9.0 clarifai-2.0.29 configparser-3.5.0 future-0.15.2 jsonschema-2.5.1 requests-2.13.0

(bb) ➜  ~ python
Python 3.5.2 (default, Sep 15 2016, 07:38:42)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from clarifai.rest import ClarifaiApp
>>> ^D

(bb) ➜  ~ python3 -c 'from clarifai.rest import ClarifaiApp'

(bb) ➜  ~ pip freeze | grep clarifai
clarifai==2.0.29

@nelsonam
Copy link
Author

@robertwenquan Yes, it worked with a fresh virtualenv. Strange! Thank you for your help.

@robertwenquan
Copy link
Contributor

good to know @nelsonam
So I am closing the ticket.

@kleber011
Copy link

i have the same problem here

josh-tepper pushed a commit that referenced this issue Aug 11, 2023
* Create convert_csv.py

* Fixed convert_csv.py for static linter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants