kushagra kumar
05/10/2022, 7:14 AMpip install -U "prefect==2.0b1"  and I am encountering below error my machine Ubuntu 20.04.4 LTS .Kevin Kho
Anna Geller
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install software-properties-common -y
sudo apt-get install python3-dateutil -y
sudo apt install python3-pip -y
pip3 install -U "prefect>=2.0b"
this has worked for me on this Ubuntu version
we also use Ubuntu in our internal CI for Prefect 2.0, so I'm sure we can resolve thatAnna Geller
Building wheel for gpustat (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/kku/work/poc_ML/envml/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9ja32lqx/gpustat/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9ja32lqx/gpustat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dsmxk9l4
       cwd: /tmp/pip-install-9ja32lqx/gpustat/
  Complete output (7 lines):
  WARNING: The wheel package is not available.
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for gpustat
  Running setup.py clean for gpustat
  Building wheel for nvidia-ml-py3 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/kku/work/poc_ML/envml/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9ja32lqx/nvidia-ml-py3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9ja32lqx/nvidia-ml-py3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-851neiik
       cwd: /tmp/pip-install-9ja32lqx/nvidia-ml-py3/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for nvidia-ml-py3
  Running setup.py clean for nvidia-ml-py3
Failed to build gpustat nvidia-ml-py3
ERROR: httpcore 0.14.7 has requirement h11<0.13,>=0.11, but you'll have h11 0.13.0 which is incompatible.kushagra kumar
05/10/2022, 12:27 PM4. Ran below commands as suggested (added in a sh script and ran )
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install software-properties-common -y
sudo apt-get install python3-dateutil -y
sudo apt install python3-pip -y
pip3 install -U "prefect>=2.0b"
I don't see the previous errors but I can see below error:
ERROR: kubernetes 23.6.0 has requirement pyyaml>=5.4.1, but you'll have pyyaml 5.3.1 which is incompatible.
ERROR: httpcore 0.14.7 has requirement h11<0.13,>=0.11, but you'll have h11 0.13.0 which is incompatible.
Also got some logs that  I don't know if that's an issue ..
Attempting uninstall: pytz
    Found existing installation: pytz 2019.3
    Not uninstalling pytz at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'pytz'. No files were found to uninstall.
  Attempting uninstall: cryptography
    Found existing installation: cryptography 2.8
    Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'cryptography'. No files were found to uninstall.
  Attempting uninstall: click
    Found existing installation: Click 7.0
    Not uninstalling click at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'Click'. No files were found to uninstall.
  Attempting uninstall: protobuf
    Found existing installation: protobuf 3.6.1
    Not uninstalling protobuf at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'protobuf'. No files were found to uninstall.
  Attempting uninstall: MarkupSafe
    Found existing installation: MarkupSafe 1.1.0
    Not uninstalling markupsafe at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'MarkupSafe'. No files were found to uninstall.Anna Geller
kushagra kumar
05/10/2022, 1:08 PMsudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install software-properties-common -y
sudo apt-get install python3-dateutil -y
sudo apt install python3-pip -y
sudo apt install <http://docker.io|docker.io> -y
PATH="$HOME/.local/bin:$PATH"
export PATH
pip3 install -U "prefect>=2.0b" supervisor
 Sharing part of the log. Also, I deleted the previous virtual env . and started fresh ...
The following packages have unmet dependencies:
 <http://docker.io|docker.io> : Depends: containerd (>= 1.2.6-0ubuntu1~)
E: Unable to correct problems, you have held broken packages.
Collecting prefect>=2.0b
  Using cached prefect-2.0b3-py3-none-any.whl (1.4 MB)
continued ....
Requirement already satisfied, skipping upgrade: googleapis-common-protos<2.0dev,>=1.52.0 in /usr/local/lib/python3.8/dist-packages (from google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-cloud-storage>=2.1.0->prefect>=2.0b) (1.56.0)
Requirement already satisfied, skipping upgrade: wcwidth>=0.1.4 in /usr/local/lib/python3.8/dist-packages (from blessed>=1.17.1->gpustat>=1.0.0b1; extra == "default"->ray[default]>=1.9; python_version < "3.10" and platform_machine == "x86_64"->prefect>=2.0b) (0.2.5)
Requirement already satisfied, skipping upgrade: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.8/dist-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes>=17.17.0->prefect>=2.0b) (0.4.8)
Installing collected packages: prefect
Successfully installed prefect-2.0b3
Now , the problem is that even though the prefect is installed I am getting ModuleNotFoundError
(env) kku@KKU:~/work/prefect_poc$ prefect --version
2.0b3
(env) kku@KKU:~/work/prefect_poc$ python car_linearregression.py 
Traceback (most recent call last):
  File "car_linearregression.py", line 13, in <module>
    from prefect import flow, task
ModuleNotFoundError: No module named 'prefect'Anna Geller
Anna Geller
kushagra kumar
05/10/2022, 1:20 PMPython 3.8.10  ray, version 1.12.0Anna Geller
Anna Geller
ModuleNotFoundError: No module named 'prefect'
it's an issue with the PYTHONPATH - try this