You are not logged in.
Pages: 1
Topic closed
Hi All
Well i am new to Archlinux and have installed it as a Guest in VirtualBox so i can have a play around, before i decide to use it on my new Netbook (when it comes) .... Anyway i have just downloaded Python 3 and i want to set the PythonPath so what is the best way to do so ?
Many Thanks
Last edited by whitetimer (2010-08-07 16:36:43)
Offline
I have no idea how to help you, but I'd recommend adding a '3' at the end of the topic's title.
Offline
You can find your current path with:
>>> import sys
>>> print sys.path
Then, you can add the following to your .bashrc, .zshrc, etc:
export PYTHONPATH=whatever you want
EDIT: In most cases when you install Python modules on Arch, they will be automatically added to the Python path. Setting your path manually is rarely needed to be done.
Last edited by cesura (2010-08-07 16:08:14)
Offline
You can find your current path with:
>>> import sys >>> print sys.path
Then, you can add the following to your .bashrc, .zshrc, etc:
export PYTHONPATH=whatever you want
EDIT: In most cases when you install Python modules on Arch, they will be automatically added to the Python path. Setting your path manually is rarely needed to be done.
But you have Python 2 and 3 - won't they be stepping on each others' toes?
Offline
But you have Python 2 and 3 - won't they be stepping on each others' toes?
I don't know. I haven't dabbled too much in Python 3. I would assume that the Python development team would be smart enough to come up with a method of differentiating Python 2 and Python 3 locations in the same path.
Offline
@whitetimer:
I suspect with "downloaded" you mean you visited the webpage of python 3, downloaded their tarball or whatever and now want to install that..Am i right?
Python 3 is in the repo
community/python3 3.1.2-3 [installed]
Next generation of the python high-level scripting language
Just install it with pacman (pacman -S python3)(after you updated the lists, pacman -Sy) and that's that.
Ogion
(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant
Offline
@Ogion
No i have installed via the repo, and everything is hunky dorey, i just wanted to set the PYTHONPATH which is done now .. So thanks to all for the advice
Offline
Ok sorry then.
Ogion
(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant
Offline
Here is some detail on how to handle different PYTHONPATHs for python 2 and 3:
http://bugs.python.org/issue2375
Offline
I found that in addition to installing:
pacman -S tensorflow
I had to install:
pacman -S python-tensorflow
After this tensorflow works in Python as I expected.
Offline
ifernando, this topic is thirteen years old and the OP has not been back since 2015. Please do not necrobump.
Closing.
Offline
Pages: 1
Topic closed