Open polarbearskill opened 8 years ago
I have the same issue and I'm trying to follow it up at the moment. As far as I can tell at the moment the key issue is
InsecurePlat rmWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may ause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
which leads to https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning The version of python in the Vagrant box is pre-2.7.9 so we need to upgrade it.
@Minyall and all: Next upgrade is 3.x and it is very different (no backward compatibility...). It could be other reason rather related to urllib3, instead. I haven't tried the vragant though.
Are there any suggestions on how to resolve this issue in the meantime? I tried upgrading to Python 2.7.10 but receive a different error. I'm reading the book and would like to follow along with the examples.
==> default: * execute[install-pip] action run[2016-06-01T17:42:23+00:00] INFO: Processing execute[install-pip] action run (python::pip line 56)
==> default: (skipped due to not_if)
==> default: [2016-06-01T17:42:23+00:00] DEBUG: Skipping execute[install-pip] due to not_if ruby block
==> default: Recipe: python::virtualenv
==> default: * python_pip[virtualenv] action install
==> default: [2016-06-01T17:42:23+00:00] INFO: Processing python_pip[virtualenv] action install (python::virtualenv line 23)
==> default: [2016-06-01T17:42:23+00:00] DEBUG: Providers for generic python_pip resource enabled on node include: [LWRP provider python_pip from cookbook python]
==> default: [2016-06-01T17:42:23+00:00] DEBUG: Provider for action install on resource python_pip[virtualenv] is LWRP provider python_pip from cookbook python
==> default: [2016-06-01T17:42:23+00:00] INFO: Installing python_pip[virtualenv] version latest
==> default:
==> default:
==> default: ================================================================================
==> default: Error executing action install
on resource 'python_pip[virtualenv]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of pip install virtualenv ----
==> default: STDOUT:
==> default: STDERR: Traceback (most recent call last):
==> default: File "/usr/local/bin/pip", line 7, in
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:155:in pip_cmd' ==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:139:in
install_package'
==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:46:in block (2 levels) in class_from_file' ==> default: /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/providers/pip.rb:44:in
block in class_from_file'
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/recipes/virtualenv.rb
==> default:
==> default: 23: python_pip "virtualenv" do
==> default: 24: action :install
==> default: 25: end
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef/0ecd7877d65a4b7c2c0ca3118d2c438e/cookbooks/python/recipes/virtualenv.rb:23:in `from_file'
==> default:
==> default: python_pip("virtualenv") do
==> default: action [:install]
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :python_pip
==> default: cookbook_name :python
==> default: recipe_name "virtualenv"
==> default: package_name "virtualenv"
==> default: end
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux
==> default:
==> default: [2016-06-01T17:42:23+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2016-06-01T17:42:23+00:00] DEBUG: Re-raising exception: Mixlib::ShellOut::ShellCommandFailed - python_pip[virtualenv](python::virtualenv line 23) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of pip install virtualenv ----
==> default: STDOUT:
==> default: STDERR: Traceback (most recent call last):
==> default: File "/usr/local/bin/pip", line 7, in
A few things have changed since the author was last seen in these parts. As of today (June 18, 2016), the following needs to be done to get vagrant up
to run successfully:
Vagrantfile
after config.vm.provision :chef_solo do |chef|
: chef.channel = "stable"
chef.version = "12.10.24"
deploy/cookbooks/python/attributes/default.rb
change the line starting with default['python']['pip_script_url']
... to read:default['python']['pip_script_url'] = 'https://bootstrap.pypa.io/get-pip.py'
Google Code is now in archive mode, so the direct link to layercake-python.tar.bz2
no longer works. To work around the issue:
fuxi/layercake-python.tar.bz2
and place it in the top-level directory that contains your Vagrantfile
.deploy/cookbooks/mtsw2e/recipes/default.rb
change the line "https://fuxi.googlecode.com/hg/layercake-python.tar.bz2",
to: "/vagrant/layercake-python.tar.bz2",
I was able to successfully run vagrant up
after completing the above.
Perfect, that solved the problem.
I have done the same but I could not be connected to the localhost. Any idea?
Now Mixlib has issues and python thinks layercake-python.tar.bz2 is not a file. I was following@alvanson solution. Using OS X El Capitan 10.11.5 and Vagrant 1.8.2
==> default: [2016-07-07T17:40:20+00:00] ERROR: python_pip[/fuxi/layercake-python.tar.bz2](mtsw2e::default line 52) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2' ==> default: ---- Begin output of pip install /fuxi/layercake-python.tar.bz2 ---- ==> default: STDOUT: Processing /fuxi/layercake-python.tar.bz2 ==> default: STDERR: Requirement '/fuxi/layercake-python.tar.bz2' looks like a filename, but the file does not exist ==> default: Exception: ==> default: Traceback (most recent call last): ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main ==> default: status = self.run(options, args) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 310, in run ==> default: wb.build(autobuilding=True) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 750, in build ==> default: self.requirement_set.prepare_files(self.finder) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 370, in prepare_files ==> default: ignore_dependencies=self.ignore_dependencies)) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 587, in _prepare_file ==> default: session=self.session, hashes=hashes) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 798, in unpack_url ==> default: unpack_file_url(link, location, download_dir, hashes=hashes) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 705, in unpack_file_url ==> default: unpack_file(from_path, location, content_type, link) ==> default: File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 602, in unpack_file ==> default: tarfile.is_tarfile(filename) or ==> default: File "/usr/lib/python2.7/tarfile.py", line 2583, in is_tarfile ==> default: t = open(name) ==> default: File "/usr/lib/python2.7/tarfile.py", line 1660, in open ==> default: return func(name, "r", fileobj, **kwargs) ==> default: File "/usr/lib/python2.7/tarfile.py", line 1722, in gzopen ==> default: fileobj = bltn_open(name, mode + "b") ==> default: IOError: [Errno 2] No such file or directory: '/fuxi/layercake-python.tar.bz2' ==> default: ---- End output of pip install /fuxi/layercake-python.tar.bz2 ---- ==> default: Ran pip install /fuxi/layercake-python.tar.bz2 returned 2 ==> default: [2016-07-07T17:40:20+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
Any further help on this topic? I am getting the same error and used the solution provided above by alvanson, to no avail
If you're following my instructions above, layercake-python.tar.bz2
needs to be in the top-level directory containing Vagrantfile
, _not_ in a separate fuxi
directory.
Hello,
I'm getting the following error when trying to vagrant up (output pasted at the bottom).
I believe this error is being caused because the following link isn't https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 working anymore? I tried to put it manually into my web browser but got a 404 link down error.
I've traced the code back to the \deploy\cookbooks\mtsw2e\recipes\default file. Which has the following code:
packages = [
Matplotlib won't install any other way right now unless you install numpy first.
http://stackoverflow.com/q/11797688
"numpy==1.7.1",
Install FuXi per https://code.google.com/p/fuxi/wiki/Installation_Testing
"http://cheeseshop.python.org/packages/source/p/pyparsing/pyparsing-1.5.5.tar.gz", "https://fuxi.googlecode.com/hg/layercake-python.tar.bz2", "https://pypi.python.org/packages/source/F/FuXi/FuXi-1.4.1.production.tar.gz", ]
****start my output *******