Installing and fast.ai

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 784 Views - Last Post: 23 March 2019 - 06:41 PM Rate Topic: -----

#1 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Installing and fast.ai

Posted 11 March 2019 - 04:43 AM

I am working on some python code to use for prediction and I need to install a fast.ai package. It seems not any easy install. The only method that I can see is to clone it from github and to do that requires and username and password. I have neither.

Where is a website that shows one how to install and use fast.ai?

Thanks in advance.

Respectfully,


Newport_j
Is This A Good Question/Topic? 0
  • +

Replies To: Installing and fast.ai

#2 andrewsw   User is online

  • quantum multiprover
  • member icon

Reputation: 6778
  • View blog
  • Posts: 27,973
  • Joined: 12-December 12

Re: Installing and fast.ai

Posted 11 March 2019 - 04:51 AM

I searched "fast.ai package" and the second link returned was to fast.ai installation. The README says that it can be installed via conda or pip.

Quote

Installation
NB: fastai v1 currently supports Linux only, and requires PyTorch v1 and Python 3.6 or later. Windows support is at an experimental stage: it should work fine but we haven't thoroughly tested it. Since Macs don't currently have good Nvidia GPU support, we do not currently prioritize Mac development.

fastai-1.x can be installed with either conda or pip package managers and also from source. At the moment you can't just run install, since you first need to get the correct pytorch version installed - thus to get fastai-1.x installed choose one of the installation recipes below using your favorite python package manager. Note that PyTorch v1 and Python 3.6 are the minimal version requirements.


fast.ai at github also has links to examples and documentation.
Was This Post Helpful? 1
  • +
  • -

#3 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2736
  • View blog
  • Posts: 4,376
  • Joined: 21-June 11

Re: Installing and fast.ai

Posted 11 March 2019 - 04:52 AM

View PostNewport_j, on 11 March 2019 - 12:43 PM, said:

It seems not any easy install.


Does pip install fastai not work?

Quote

The only method that I can see is to clone it from github and to do that requires and username and password.


You don't need a github account to clone public github projects (which this is).
Was This Post Helpful? 0
  • +
  • -

#4 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 11 March 2019 - 03:52 PM

You say that you do not need an account at GItHub to clone fast.ai. When to tried to clone

git clone https://github...

It first asked for a username which I did not give it. I have none. Then it asked for password which I did not give because I did not
have it. Is there way to clone say fast.ai without using a username and password?

Also, I have Ubuntu 16.04 and it uses Python 3.5.2. Is that enough for fast.ai?

I am reluctant to upgrade python for now. Too many existing programs use 3.5.2?

I need fast.ai.

Thanks in advance.

Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#5 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 11 March 2019 - 04:19 PM

pip3 install fast.ai

did not work, but

pip3 install fastai

did, I am not sure why , I thought it was fast.ai

Anyway, when I typed

pip3 install fast.ai,

It gave me this out


    Complete output from command python setup.py egg_info:
    SSE2 detected
    AVX2 detected
    running egg_info
    creating pip-egg-info/bcolz.egg-info
    writing top-level names to pip-egg-info/bcolz.egg-info/top_level.txt
    writing requirements to pip-egg-info/bcolz.egg-info/requires.txt
    writing dependency_links to pip-egg-info/bcolz.egg-info/dependency_links.txt
    writing pip-egg-info/bcolz.egg-info/PKG-INFO
    writing manifest file 'pip-egg-info/bcolz.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-tulypbku/bcolz/setup.py", line 234, in <module>
        cmdclass=LazyCommandClass(),
      File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py",
line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.5/dist-packages/setuptools/command/egg_info.py",
line 296, in run
        self.find_sources()
      File "/usr/local/lib/python3.5/dist-packages/setuptools/command/egg_info.py",
line 303, in find_sources
        mm.run()
      File "/usr/local/lib/python3.5/dist-packages/setuptools/command/egg_info.py",
line 534, in run
        self.add_defaults()
      File "/usr/local/lib/python3.5/dist-packages/setuptools/command/egg_info.py",
line 570, in add_defaults
        sdist.add_defaults(self)
      File "/usr/local/lib/python3.5/dist-packages/setuptools/command/py36compat.py",
line 36, in add_defaults
        self._add_defaults_ext()
      File "/usr/local/lib/python3.5/dist-packages/setuptools/command/py36compat.py",
line 119, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "/usr/lib/python3.5/distutils/cmd.py", line 298, in
get_finalized_command
        cmd_obj = self.distribution.get_command_obj(command, create)
      File "/usr/lib/python3.5/distutils/dist.py", line 846, in get_command_obj
        klass = self.get_command_class(command)
      File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py",
line 840, in get_command_class
        return self.cmdclass[command]
      File "/tmp/pip-install-tulypbku/bcolz/setup.py", line 56, in __getitem__
        class build_ext(cython_build_ext):
    TypeError: module.__init__() takes at most 2 arguments (3 given)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-install-tulypbku/bcolz/
You are using pip version 19.0.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.




I am not sure what it is telling me. I too new to Python to understand.


I installed using pip3 not pip becuase I am using Python3.

Anyway, what does

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-tulypbku/bcolz/

mean?

Thanks in advance.

Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#6 hexagod   User is offline

  • 😂😂😂
  • member icon

Reputation: 31
  • View blog
  • Posts: 577
  • Joined: 29-October 16

Re: Installing and fast.ai

Posted 11 March 2019 - 04:27 PM

I'm not logged into GitHub ATM and I can download projects. Go to the very root of the project then:

Attached Image

then

Attached Image

and extract with any zip extractor

I'm not logged in and that does the same as "cloning"

This post has been edited by hexagod: 11 March 2019 - 04:30 PM

Was This Post Helpful? 0
  • +
  • -

#7 andrewsw   User is online

  • quantum multiprover
  • member icon

Reputation: 6778
  • View blog
  • Posts: 27,973
  • Joined: 12-December 12

Re: Installing and fast.ai

Posted 12 March 2019 - 02:14 AM

Quote

Also, I have Ubuntu 16.04 and it uses Python 3.5.2. Is that enough for fast.ai?

Did you miss my earlier post?

Quote

Note that PyTorch v1 and Python 3.6 are the minimal version requirements.

Was This Post Helpful? 0
  • +
  • -

#8 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2736
  • View blog
  • Posts: 4,376
  • Joined: 21-June 11

Re: Installing and fast.ai

Posted 12 March 2019 - 04:01 AM

View PostNewport_j, on 11 March 2019 - 11:52 PM, said:



Can you please post that again, but within il or code tags? Without it the URL gets cut off. My guess is that you misspelled the URL.
Was This Post Helpful? 0
  • +
  • -

#9 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 13 March 2019 - 05:44 AM

I just need to know how to install fast.ai. I tried to install it using the guidance of this YouTube video. This is when it asked me for a username and password.

https://www.youtube....h?v=fA33llwaa04

I installed spell from this video and as I said that is when I installed (cloned) fast.ai and it asked asked me for a username and password.

I am using Ubuntu 16.04 and I am using jupyter IDE. I am just confused as to how to make the fast.ai install.

I take it that one must install other apps before (or maybe during) the fast.ai install.

Any help appreciated.

Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#10 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 15 March 2019 - 01:45 PM

I need to askagin, to install fast.ai does one need to install pytorch first? If so then what version of pytorch?

The reason that I am asking is that there is a lot in pytorch. If it must be installed then fine. But I just need to know if it
should be and what version.

Thanks in advance.

Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#11 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 976
  • View blog
  • Posts: 3,849
  • Joined: 13-June 14

Re: Installing and fast.ai

Posted 16 March 2019 - 06:13 AM

If you install using pip, it'll take care of the dependencies for you.
Was This Post Helpful? 1
  • +
  • -

#12 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 16 March 2019 - 06:46 AM

I could see that when it I did try to install using pip3. However it still refused to install fastai.

I am guessing it is because it noticed my Python 3.5.2 install. Now please note that I also
had Python 3.6.6 installed.

However, when I type Python --version I get Python 3.5.2. When I type Python3.6 --version it
returns Python 3.6.6. So I am guessing it sees Python 3.5.2 and aborts the install because it
is 3.5.2.

Again, It must think that my default Python is 3.5.2 and aborts the install even though Python 3.6.6 is installed.

So how can I address this?

I have Python 3.6 or higher installed, but it is still finding 3.5.2.

Thanks in advance.

Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#13 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2736
  • View blog
  • Posts: 4,376
  • Joined: 21-June 11

Re: Installing and fast.ai

Posted 16 March 2019 - 07:31 AM

Instead of pip, you can also run python -m pip, which will run pip through the given python interpreter. So python3.6 -m pip install fastai should install fastai using Python 3.6.6 on your machine.
Was This Post Helpful? 0
  • +
  • -

#14 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 16 March 2019 - 08:47 AM

Okay, I will give it a try. But I use pip3 far more often than just pip because I am mostly using
Python 3 regardless of the two versions on my hard drive.

When I installed Python 3.6.6, the software gave me a warning to not uninstall Python 3.5.2 or else must trouble would ensue. I must keep Python 3.5.2 on the hard drive for now.

So what is the exact syntax to install fast.ai.] Python3.6.6?

Thanks in advance.

Respectfully,

Newport_j
Was This Post Helpful? 0
  • +
  • -

#15 Newport_j   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 24-February 19

Re: Installing and fast.ai

Posted 16 March 2019 - 01:45 PM

I used your syntax and it seemed to work. Then it failed because of memory error. So i guess that
is a no longer useful approach.

I noticed that on this computer that I had AMD Radeon gpu. Does that make any difference. It is still a gpu so does it work?

I know that there is CPU only fastai. Can I use that?

The old way did not work. Time for a different fast.ai install.

Thanks in advance.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2