https://pulumi.com logo
#getting-started
Title
# getting-started
r

rhythmic-receptionist-62263

02/28/2023, 6:42 PM
Hi Guys, I'm having problems with a second machine. I used pulumi on one and life was good. But my other machine doesn't seem to want to work. I upgraded python to 3.7.5 as it was < 3.6. After installing pulumi and trying to up the stack I get the following. `error: failed to discover plugin requirements: calling `python -m pip list -v --format json`: exit status 1` I tried running it against the virtual environment that gets created and indeed there was no pip. But this venv is created by pulumi. e.g
/home/user1/code/user1-pulumi-testing/venv/bin/python -m pip list -v --format json
/home/user1/code/user1-pulumi-testing/venv/bin/python: No module named pip
I'm not sure how to try and get this sorted.
b

billowy-army-68599

02/28/2023, 7:07 PM
I would blow away the virtual env and start again here:
Copy code
rm -rf venv
python -m venv venv
venv/bin/pip3 install -r requirements.txt
r

rhythmic-receptionist-62263

02/28/2023, 8:30 PM
Thanks @billowy-army-68599, I had been deleting the venv and rerunning pulumi up to recreate the venv which continued to fail. After deleting it and recreating using that above method it recreated with pip available fine. But then doing the requirements fell over..Just working through seeing if I can get past that.
b

billowy-army-68599

02/28/2023, 8:31 PM
what error do you have?
r

rhythmic-receptionist-62263

02/28/2023, 8:37 PM
it error'd trying to install the bdist_wheel package due to a bunch of cache errors. So I went through and tried to clean it up. Rerunning it now and its gone through but has currently been sitting on this for the last 10 mins. Building wheels for collected packages: pulumi-azure-native, grpcio, pyyaml Running setup.py bdist_wheel for pulumi-azure-native ... | Not sure if its just my internet connect causing it or not.
b

billowy-army-68599

02/28/2023, 8:42 PM
from your global python environment, install the wheel package
pip install wheel
r

rhythmic-receptionist-62263

02/28/2023, 9:27 PM
Yea still struggling here. The install of the requirements looks good.
Collecting pulumi<4.0.0,>=3.0.0 (from -r ../../requirements.txt (line 1))
Using cached <https://files.pythonhosted.org/packages/41/d5/0c9183fd6153fff68f5fd220cf145e54e2f345d888237882e90410ea8274/pulumi-3.55.0-py3-none-any.whl>
Collecting pulumi-azure-native<2.0.0,>=1.0.0 (from -r ../../requirements.txt (line 2))
Collecting protobuf~=4.21 (from pulumi<4.0.0,>=3.0.0->-r ../../requirements.txt (line 1))
Using cached <https://files.pythonhosted.org/packages/2b/ed/8f2113e3446bc98555cce3a17403180f86c70a51b9e61ef973e9c8df7179/protobuf-4.22.0-py3-none-any.whl>
Collecting pyyaml~=6.0 (from pulumi<4.0.0,>=3.0.0->-r ../../requirements.txt (line 1))
Collecting dill~=0.3 (from pulumi<4.0.0,>=3.0.0->-r ../../requirements.txt (line 1))
Using cached <https://files.pythonhosted.org/packages/be/e3/a84bf2e561beed15813080d693b4b27573262433fced9c1d1fea59e60553/dill-0.3.6-py3-none-any.whl>
Collecting six~=1.12 (from pulumi<4.0.0,>=3.0.0->-r ../../requirements.txt (line 1))
Using cached <https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl>
Collecting semver~=2.8 (from pulumi<4.0.0,>=3.0.0->-r ../../requirements.txt (line 1))
Using cached <https://files.pythonhosted.org/packages/0b/70/b84f9944a03964a88031ef6ac219b6c91e8ba2f373362329d8770ef36f02/semver-2.13.0-py2.py3-none-any.whl>
Collecting grpcio==1.50 (from pulumi<4.0.0,>=3.0.0->-r ../../requirements.txt (line 1))
Using cached <https://files.pythonhosted.org/packages/71/87/118ed062bba99c54162f9b3a15cc58f018e157fe2f274edd7bc1a8a5bfe2/grpcio-1.50.0.tar.gz>
Collecting parver>=0.2.1 (from pulumi-azure-native<2.0.0,>=1.0.0->-r ../../requirements.txt (line 2))
Using cached <https://files.pythonhosted.org/packages/dd/62/4e57467a2690df92c61bbf0afbb32a1f8763e34f7bf6c1577c6b80b98ebd/parver-0.4-py3-none-any.whl>
Collecting arpeggio>=1.7 (from parver>=0.2.1->pulumi-azure-native<2.0.0,>=1.0.0->-r ../../requirements.txt (line 2))
Using cached <https://files.pythonhosted.org/packages/7a/b7/62898ef180bbfea60d28678040ddbb50e36c180d5c56e9cc62b7944c4623/Arpeggio-2.0.0-py2.py3-none-any.whl>
Collecting attrs>=19.2 (from parver>=0.2.1->pulumi-azure-native<2.0.0,>=1.0.0->-r ../../requirements.txt (line 2))
Using cached <https://files.pythonhosted.org/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl>
Collecting typing-extensions; python_version < "3.10" (from parver>=0.2.1->pulumi-azure-native<2.0.0,>=1.0.0->-r ../../requirements.txt (line 2))
Using cached <https://files.pythonhosted.org/packages/31/25/5abcd82372d3d4a3932e1fa8c3dbf9efac10cc7c0d16e78467460571b404/typing_extensions-4.5.0-py3-none-any.whl>
Building wheels for collected packages: grpcio
Running setup.py bdist_wheel for grpcio ... done
Stored in directory: /home/awarner/.cache/pip/wheels/db/85/ef/043fe82f74e55c12d17eed090f35409c519cb4130972ad4af5
Successfully built grpcio
Installing collected packages: protobuf, pyyaml, dill, six, semver, grpcio, pulumi, arpeggio, attrs, typing-extensions, parver, pulumi-azure-native
Successfully installed arpeggio-2.0.0 attrs-22.2.0 dill-0.3.6 grpcio-1.50.0 parver-0.4 protobuf-4.22.0 pulumi-3.55.0 pulumi-azure-native-1.96.0 pyyaml-6.0 semver-2.13.0 six-1.16.0 typing-extensions-4.5.0
But pulumi up fails.
Diagnostics:
pulumi:pulumi:Stack (azure-test-dev):
Traceback (most recent call last):
File "/home/awarner/.pulumi/bin/pulumi-language-python-exec", line 16, in <module>
import pulumi
ModuleNotFoundError: No module named 'pulumi'
It looks like the Pulumi SDK has not been installed. Have you run pip install?
If you are running in a virtualenv, you must run pip install -r requirements.txt from inside the virtualenv.
error: an unhandled error occurred: program exited with non-zero exit code: 1
b

billowy-army-68599

02/28/2023, 9:29 PM
can you share your
Pulumi.yaml
?
r

rhythmic-receptionist-62263

02/28/2023, 9:31 PM
name: azure-test
runtime:
name: python
options:
virtualenv: venv
description: A quick test in azure
Just a basic one.
b

billowy-army-68599

02/28/2023, 9:32 PM
how did you install your deps?
ie: what command did you run?
r

rhythmic-receptionist-62263

02/28/2023, 9:33 PM
I manually ran the pip install requirements from the venv. Though in saying that. I haven't activated the environment prior to doing that.
I guess the part I'm a little confused about is that when I ran this on my other machine pulumi handled all dependencies and venv creation quite happily, so wondering if I've potentially got something broken in this distribution.
b

billowy-army-68599

02/28/2023, 9:40 PM
i don’t think so, it does look like it’s fixable
if you run
venv/bin/pip3 install pulumi pulumi-azure-native
what happens?
r

rhythmic-receptionist-62263

02/28/2023, 10:59 PM
It runs through and looks like its installing everything, no errors. Then the same issue when you try to pulumi up. Its like its doing it against the global python install rather than the venv
b

billowy-army-68599

02/28/2023, 11:13 PM
hmm, I’m baffled I’m afraid 😞
r

rhythmic-receptionist-62263

02/28/2023, 11:18 PM
no worries. Thanks heaps for the help. I'll continue on and see if I can figure out whats missing here.
fyi. I ran a os update/upgrade. Then after that it still wouldn't work. Then deleted the venv, then let pulumi up run again and it created the venv itself and everything worked fine. Very strange.
2 Views