dragnet-org / dragnet

Just the facts -- web page content extraction
MIT License
1.25k stars 180 forks source link

I don't understand the install on Vagrant #43

Closed gvola closed 7 years ago

gvola commented 7 years ago

vagrant@precise64:/vagrant/dragnet-1.1.0$ make test nosetests --exe --cover-package=dragnet --with-coverage --cover-branches -v --cover-erase make: nosetests: Command not found make: *** [nose] Error 127

gvola commented 7 years ago

vagrant@precise64:/vagrant$ cd dragnet vagrant@precise64:/vagrant/dragnet$ make test nosetests --exe --cover-package=dragnet --with-coverage --cover-branches -v --cover-erase make: nosetests: Command not found make: *** [nose] Error 127 vagrant@precise64:/vagrant/dragnet$

b4hand commented 7 years ago

The Vagrantfile specifies a trusty64 image, so how are you getting a vagrant@precise64 prompt?

My prompt inside the VM looks like this:

vagrant@vagrant-ubuntu-trusty-64:~$

And running make test runs the tests as expected.

gvola commented 7 years ago

I do a vagrant up and vagrant ssh

gvola commented 7 years ago

How do you get the trusty64 image up and running ?

gvola commented 7 years ago

vola-g@PO30623 MINGW64 ~ $ git clone git@github.com:seomoz/dragnet.git Cloning into 'dragnet'... Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

gvola commented 7 years ago

vagrant@dragnet:/vagrant$ make test nosetests --exe --cover-package=dragnet --with-coverage --cover-branches -v --cover-erase Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named numpy) ... ERROR Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named lxml) ... ERROR Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named numpy) ... ERROR Failure: ImportError (No module named blocks) ... ERROR Failure: ImportError (No module named blocks) ... ERROR

====================================================================== ERROR: Failure: ImportError (No module named blocks)

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/nose-1.3.7-py2.7.egg/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/usr/local/lib/python2.7/dist-packages/nose-1.3.7-py2.7.egg/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/local/lib/python2.7/dist-packages/nose-1.3.7-py2.7.egg/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/vagrant/dragnet/init.py", line 1, in from dragnet.blocks import Blockifier, PartialBlock, BlockifyError ImportError: No module named blocks

b4hand commented 7 years ago

The current Vagrantfile already specifies trusty64, so if you use vagrant up in the checked out directory, it should automatically use trusty64.

b4hand commented 7 years ago

Typically, you'll need to use the HTTPS method for cloning the repo if you don't have commit access.

gvola commented 7 years ago

vola-g@PO30623 MINGW64 ~/dragnet (master) $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'ubuntu/trusty64' is up to date... ==> default: There was a problem while downloading the metadata for your box ==> default: to check for updates. This is not an error, since it is usually due ==> default: to temporary network problems. This is just a warning. The problem ==> default: encountered was: ==> default: ==> default: Failed to connect to atlas.hashicorp.com port 443: Connection refused ==> default: ==> default: If you want to check for box updates, verify your network connection ==> default: is valid and try again. ==> default: Clearing any previously set forwarded ports... ==> default: Fixed port collision for 22 => 2222. Now on port 2200. ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2200 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2200 default: SSH username: vagrant default: SSH auth method: private key ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.3.36 default: VirtualBox Version: 5.1 ==> default: Setting hostname... ==> default: Mounting shared folders... default: /vagrant => C:/Users/vola-g.SAVOIE/dragnet ==> default: Machine already provisioned. Run vagrant provision or use the --provision ==> default: flag to force provisioning. Provisioners marked to run always will still run.

gvola commented 7 years ago

vagrant@dragnet:/vagrant$ sudo make test nosetests --exe --cover-package=dragnet --with-coverage --cover-branches -v --cover-erase Coverage.py warning: Module dragnet has no Python source. /usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/vagrant/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning) Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named scipy.optimize) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR Failure: ImportError (No module named sklearn) ... ERROR

b4hand commented 7 years ago

The instructions in the README for Vagrant do not say to use sudo:

vagrant ssh # these should now pass
$ make test

Using sudo changes the environment variables such that the build won't work.

gvola commented 7 years ago

Thanks. I spent time trying ti install dragnet with Vagrant but I did not succeed.