Python Forum

Full Version: Python 3.9 alpha how to install psutil?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I tryed python 3.9 alpha but its failed to install psutil?

pip install psutil
Requirement already satisfied: psutil in /usr/local/lib64/python3.8/site-packages (5.7.0)
Your pip point to 3.8,you have to point/alias to new version example.

Also using pyenv is better and safer in shall switch and test newer versions.
pyenv Simple Python Version Management
So here a run,this took me couple of minute.
# Test pip
tom@tom:~$ pip -V
pip 19.2.3 from /home/tom/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pip (python 3.8)

# Install 3.9-dev
tom@tom:~$ pyenv install 3.9-dev
Cloning https://github.com/python/cpython...
Installing Python-3.9-dev...
Installed Python-3.9-dev to /home/tom/.pyenv/versions/3.9-dev

# Set 3.9-dev as system-wide version
tom@tom:~$ pyenv global 3.9-dev

# Test pip
tom@tom:~$ pip -V
pip 19.2.3 from /home/tom/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/pip (python 3.9)

# Install psutil
tom@tom:~$ pip install psutil
Collecting psutil
  Downloading .....
Successfully installed psutil-5.7.0

# Test that it work
tom@tom:~$ python
Python 3.9.0a5+ (heads/master:5cd2803, Apr  9 2020, 20:37:13) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>>
>>> psutil.__version__
'5.7.0'
>>> exit()
tom@tom:~$ 
Something misssing?

dnf install -y python3-devel.x86_64
Last metadata expiration check: 0:02:55 ago on to. 09. april 2020 kl. 23.01 +0300.
Package python3-devel-3.8.2-2.fc32.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
[root@PC3# pyenv global 3.9-dev
bash: pyenv: command not found...
[root@PC3]# pip -V
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
pyenv install 3.9-dev
bash: pyenv: command not found...
Did you also have idea here?
I have issue with this om some windows 10 computer did not know why?
[Image: cpuinfo.png]
(Apr-09-2020, 08:08 PM)lmh1 Wrote: [ -> ]Something misssing?
Yes,you have not install/setup pyenv correct.
You most follow all step(can not skip anything) here under Setting up pyenv.

Testing that it work first commands.
# Test that it work
tom@tom:~$ pyenv --version
pyenv 1.2.9-149-g0f2d6597

# Update
tom@tom:~$ pyenv update

# Look at available versions 
tom@tom:~$ pyenv install --list
Then as i posted to install 3.9 and set as global version.

Windows problem look like a network/firewall issue so look at that.
Try upgrade pip.
python -m pip install –upgrade pip
Look at this post for other stuff to try.
Still did not works, pyenv --version
bash: pyenv: command not found...

This is writed for ubuntu\mint\kubuntu not for fedora\opensuse.

I have upgraded pip so that is not issue.
Its works with other expendition.
Quote:I get Command 'pyenv' not found, did you mean:

command 'pyvenv' from deb python3-venv (3.8.2-0ubuntu2)
command 'p7env' from deb libnss3-tools (2:3.49.1-1ubuntu1)

Try: sudo apt install <deb name>

fatal: could not create leading directories of '/plugins/pyenv-virtuale': Ikke tilgang
on ubuntu 20.04
(Apr-10-2020, 02:34 PM)lmh1 Wrote: [ -> ]This is writed for ubuntu\mint\kubuntu not for fedora\opensuse.
Yes,it mention in tutorial that is for Ubuntu\Mint.
I give a link in tutorial for other distros.
snippsat Wrote:Look at wiki for eg Mac OS X and other distros.
Here tutorial for CentOS/Fedora.
I also have question for ubuntu\mint:
Quote:Traceback (most recent call last):
File "menu.py", line 1, in <module>
from tkinter import Tk, Menu , messagebox
ImportError: No module named tkinter

Quote:i have installed python-tk (2.7.18-1).
and python3-tk (3.8.2-1ubuntu1)
Not sure what more can be wrong?
You are running the Tkinter code with Python 2,that's why you get that error message.
Bye default not using pyenv,it's python3 and pip3 to use Python 3.
Quote:After this, just append the pyenv initializator command on your “.bashrc” file
Remark: If you use ZSH instead of Bash, update the “.zshrc” file.

export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

After that, logout/login or exec this command to reload configuration; (in case of zsh, change this file to .zshrc;

source ~/.bashrc

Did not understand this?

Tested with.
Quote:Traceback (most recent call last):
File "test.py", line 18, in <module>
from pip._internal.operations.prepare import Installed
ImportError: cannot import name 'Installed' from 'pip._internal.operations.prepare' (/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py)
Quote:Traceback (most recent call last):
File "test.py", line 56, in <module>
root.title( "Testprogram " + platform.linux_distribution()[0] + platform.linux_distribution()[1])
AttributeError: module 'platform' has no attribute 'linux_distribution'
Why did this only failed on ubuntu not with fedora? the first one.
I also have issue its hard to find out charges for release. So hard to know what its charged.

https://www.programcreek.com/python/exam...stribution
it is outdated code?
(Apr-10-2020, 03:23 PM)lmh1 Wrote: [ -> ]Did not understand this?
You need to open ~/.bashrc in a editor and add those line last.
If fedora dos not comes with nano.
sudo dnf install nano
Then you can follow in my tutorial under 3. Add to ~/.bashrc

The other stuff do i not want to look at now,get one thing to work first.
You struggle now bit with basic usage of OS's and Python Undecided
Pages: 1 2