May-05-2020, 09:55 PM
Hi snippsat
You are right. As I am lazy, I defined an alias
So, I still have a question regarding my own scripts.
Do I have to store them in /home/remi/.local/lib/python3.8/site-packages or could I let them in a specific directory, and in that case, how can I have this directory be included in sys.path at Python's launch when typing «Python» on the command line ? (I know it is included in sys.path[0] when I type «Python <my_script> on the command line)
Arbiel
You are right. As I am lazy, I defined an alias
remi@remi-Vostro-3550:~$ alias python alias python='python3.8' remi@remi-Vostro-3550:~$I don't remember how I installed Python and BeautifulSoup. I made a new BeautifulSoup install following your instruction
remi@remi-Vostro-3550:~$ pip -V pip 20.1 from /home/remi/.local/lib/python3.8/site-packages/pip (python 3.8) remi@remi-Vostro-3550:~$ python -m pip install beautifulsoup4 Defaulting to user installation because normal site-packages is not writeable Collecting beautifulsoup4 Using cached beautifulsoup4-4.9.0-py3-none-any.whl (109 kB) Collecting soupsieve>1.2 Using cached soupsieve-2.0-py2.py3-none-any.whl (32 kB) Installing collected packages: soupsieve, beautifulsoup4 Successfully installed beautifulsoup4-4.9.0 soupsieve-2.0 remi@remi-Vostro-3550:~$ pip install --user beautifulsoup4 Requirement already satisfied: beautifulsoup4 in ./.local/lib/python3.8/site-packages (4.9.0) Requirement already satisfied: soupsieve>1.2 in ./.local/lib/python3.8/site-packages (from beautifulsoup4) (2.0) remi@remi-Vostro-3550:~$I've removed bs4 and beautifulsoup4-4.6.0.egg-info from /usr/lib/python3/dist-packages as they now have been installed in /home/remi/.local/lib/python3.8/site-packages.
So, I still have a question regarding my own scripts.
Do I have to store them in /home/remi/.local/lib/python3.8/site-packages or could I let them in a specific directory, and in that case, how can I have this directory be included in sys.path at Python's launch when typing «Python» on the command line ? (I know it is included in sys.path[0] when I type «Python <my_script> on the command line)
Arbiel
using Ubuntu 18.04.4 LTS, Python 3.8
having substituted «https://www.lilo.org/fr/» to google, «https://protonmail.com/» to any other unsafe mail service and bépo to azerty (french keyboard layouts)
having substituted «https://www.lilo.org/fr/» to google, «https://protonmail.com/» to any other unsafe mail service and bépo to azerty (french keyboard layouts)