Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

77%
+5 −0
Q&A Adding Python 3.11 to `$PATH`

I built Python 3.11 from source (from GitHub python/cpython branch "3.11"). Here is what I did (after downloading the repo as ZIP) cd Downloads 7z x cpython-3.11.zip cd cpython-3.11 chmod +x c...

2 answers  ·  posted 1y ago by HGStyle‭  ·  last activity 11mo ago by terdon‭

#3: Post edited by user avatar AdminBee‭ · 2023-06-21T15:54:05Z (11 months ago)
Minor rephrasing and reformatting, remove duplicating tags, add tag "software-installation"
Adding Python 3.11 to `$PATH`
  • Hi, I'm new here.
  • So basically I builded Python 3.11 (https://python.org/) from source (from GitHub python/cpython branch "3.11").
  • So, here what I did : (obviously first I downloaded the repo as ZIP)
  • ```
  • cd Downloads
  • 7z x cpython-3.11.zip
  • cd cpython-3.11
  • chmod +x configure
  • ./configure
  • make
  • ```
  • Everything is okay, I can run Python 3.11 **only in the directory** because it is not added to `$PATH`.
  • And here is the problem.
  • What I tried :
  • 1. Rename the file `~/cpython-3.11/python` to `~/cpython-3.11/python3.11`
  • 2. Open the `.bashrc` file located in /home/[username]/
  • 3. Added that line of code at the end :
  • `export PATH="/home/hg/cpython-3.11/python3.11:$PATH`
  • Note that my user name is `hg` (**HG**Style).
  • So I restarted my terminal and it does not work.
  • Can someone help please ?
  • I tried to do the same thing on the `.profile` file but it still does not work. I tried to remove the quote marks but it still does not work.
  • I built [Python 3.11](https://python.org/) from source (from GitHub python/cpython branch "3.11").
  • Here is what I did (after downloading the repo as ZIP)
  • ```lang-shell
  • cd Downloads
  • 7z x cpython-3.11.zip
  • cd cpython-3.11
  • chmod +x configure
  • ./configure
  • make
  • ```
  • Everything is okay, but I can run Python 3.11 **only in the `cpython-3.11` directory** because it is not added to `$PATH`. And here is the problem.
  • What I tried :
  • 1. Rename the file `~/cpython-3.11/python` to `~/cpython-3.11/python3.11`
  • 2. Open the `.bashrc` file located in `/home/[username]/`
  • 3. Added that line of code at the end:
  • ```lang-bash
  • export PATH="/home/hg/cpython-3.11/python3.11:$PATH
  • ```
  • (Note that my user name is `hg`, cf. **HG**Style).
  • So I restarted my terminal and it does not work.
  • Can someone help please ?
  • * I tried to do the same thing on the `.profile` file but it still does not work.
  • * I tried to remove the quote marks but it still does not work.
#2: Post edited by user avatar HGStyle‭ · 2022-11-01T10:54:57Z (over 1 year ago)
  • Hi, I'm new here.
  • So basically I builded Python 3.11 (https://python.org/) from source (from GitHub python/cpython branch "3.11").
  • So, here what I did : (obviously first I downloaded the repo as ZIP)
  • ```
  • cd Downloads
  • 7z x cpython-3.11.zip
  • cd cpython-3.11
  • chmod +x configure
  • ./configure
  • make
  • ```
  • Everything is okay, I can run Python 3.11 **only in the directory** because it is not added to `$PATH`.
  • And here is the problem.
  • What I tried :
  • 1. Rename the file `~/cpython-3.11/python` to `~/cpython-3.11/python3.11`
  • 2. Open the `.bashrc` file located in /home/[username]/
  • 3. Added that line of code at the end :
  • `export PATH="/home/hg/cpython-3.11/python3.11:$PATH`
  • Note that my user name is `hg` (**HG**Style).
  • So I restarted my terminal and it does not work.
  • Can someone help please ?
  • Hi, I'm new here.
  • So basically I builded Python 3.11 (https://python.org/) from source (from GitHub python/cpython branch "3.11").
  • So, here what I did : (obviously first I downloaded the repo as ZIP)
  • ```
  • cd Downloads
  • 7z x cpython-3.11.zip
  • cd cpython-3.11
  • chmod +x configure
  • ./configure
  • make
  • ```
  • Everything is okay, I can run Python 3.11 **only in the directory** because it is not added to `$PATH`.
  • And here is the problem.
  • What I tried :
  • 1. Rename the file `~/cpython-3.11/python` to `~/cpython-3.11/python3.11`
  • 2. Open the `.bashrc` file located in /home/[username]/
  • 3. Added that line of code at the end :
  • `export PATH="/home/hg/cpython-3.11/python3.11:$PATH`
  • Note that my user name is `hg` (**HG**Style).
  • So I restarted my terminal and it does not work.
  • Can someone help please ?
  • I tried to do the same thing on the `.profile` file but it still does not work. I tried to remove the quote marks but it still does not work.
#1: Initial revision by user avatar HGStyle‭ · 2022-11-01T10:37:33Z (over 1 year ago)
Adding Python 3.11 to `$PATH`
Hi, I'm new here.
So basically  I builded Python 3.11 (https://python.org/) from source (from GitHub python/cpython branch "3.11").
So, here what I did : (obviously first I downloaded the repo as ZIP)
```
cd Downloads
7z x cpython-3.11.zip
cd cpython-3.11
chmod +x configure
./configure
make
```
Everything is okay, I can run Python 3.11 **only in the directory** because it is not added to `$PATH`.
And here is the problem.

What I tried :

1. Rename the file `~/cpython-3.11/python` to `~/cpython-3.11/python3.11`
2. Open the `.bashrc` file located in /home/[username]/
3. Added that line of code at the end :
`export PATH="/home/hg/cpython-3.11/python3.11:$PATH`

Note that my user name is `hg` (**HG**Style).
So I restarted my terminal and it does not work.
Can someone help please ?