Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

prelimininary things for the installation of a Python-env.

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
say_hello
Posts: 36
Joined: 2019-10-13 09:58

prelimininary things for the installation of a Python-env.

#1 Post by say_hello »

hello dear,

i am currently preparing my Asus Notebook for the installation of a Python-development environment. 
the prelimininary things i do are the following tests and here is what i have encountered. 

note: i am on Linux: 

Code: Select all

martin@MartinsMX-Rechner:~
$ python --version
Python 2.7.13
martin@MartinsMX-Rechner:~
$ uname -a
Linux MartinsMX-Rechner 4.19.0-5-amd64 #1 SMP Debian 4.19.37-2~mx17+1 (2019-05-15) x86_64 GNU/Linux
martin@MartinsMX-Rechner:~
$ 

well - i guess that i have to 


- renew the python version. this is pretty important!
- have a closer look at the MX-version ( - actual version is 19.1

then i should do the following:  

to setup pipenv to run and work with Python.

Code: Select all

cf. python-guide.org/dev/virtualenvs/
Make sure you’ve got Python & pip
Before you go any further, make sure you have Python and that it’s available from your command line. You can check this by simply running:

$ python --version
You should get some output like 3.6.2. If you do not have Python, please install the latest 3.x version from python.org or
 refer to the Installing Python section of this guide.

the question is: How do I setup pipenv to use Python 3.6 when my system does not have python 3.6?

Code: Select all

$ pipenv --python 2.7.1.3
Warning: python 2.7.1.3 was not found on your system…
You can specify specific versions of Python with:

Code: Select all

  $ pipenv --python path/to/python
i guess - that i either sensu python-guide.org/dev/virtualenvs/ can work on the issues: 
- either i can manually write the version i need in the according Pipfile:

Code: Select all

[requires]
python_version = "2.7.1.3"
Or i can install it on my system. But I guess we will need the version to be installed if we plan to actually run pipenv install.therefore i think that i should go ahead and use pyenv sensu: https://github.com/pyenv/pyenv.
i think that i have to follow the installation instructions, then afterwards installing Python 2.7.1.3. is just a matter of

 

Code: Select all

pyenv install 2.7.1.3
Then i can set the order of preference with

Code: Select all

pyenv global system 2.7.1.3
Besides, if pyenv is available, pipenv will automatically use it to install the required version. From pipenv README: Automatically install required Pythons, if pyenv is available.
 
This does a user installation to prevent breaking any system-wide packages. If pipenv isn’t available in the shell after installation, you’ll need to add the user base’s binary directory to your PATH.
On Linux and macOS you can find the user base binary directory by running python -m site --user-base and adding bin to the end. For example, this will typically

Code: Select all

 print ~/.local (with ~ expanded
to the absolute path to your home directory) so you’ll need to add

Code: Select all

~/.local/bin to your PATH. You can set your PATH permanently by modifying ~/.profile.
by the way: On Windows you can find the user base binary directory by running py -m site --user-site and replacing site-packages with Scripts.

For example, this could return C:\Users\Username\AppData\Roaming\Python36\site-packages so you would need to set your PATH to include C:\Users\Username\AppData\Roaming\Python36\Scripts. You can set your user PATH permanently in the Control Panel. You may need to log out for the PATH changes to take effect.
by the way: Well - i am on Linux and i want to set up the environment on a linux-machine.


what do you say...?
Look forward to hear from you



User avatar
say_hello
Posts: 36
Joined: 2019-10-13 09:58

Re: prelimininary things for the installation of a Python-en

#2 Post by say_hello »

update:

with python3 --version i get back Python 3.5.3

i have both - that is great.

thats great. Now i will go ahead with the setup of the python development environment.. Which steps to go...

i need a ide (pycharme, ATOM or VSCode _ which is named VScodium on the Linux-side...

what do you suggest - which one and how to achive a nice setup

btw: i want - first of all - switch to the newest version of MX _ the version 19.1 - is this the very first - the preliminary step.....!?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: prelimininary things for the installation of a Python-en

#3 Post by Head_on_a_Stick »

say_hello wrote:i am on Linux​
But you're not using Debian.

Please ask on the MX forums, the users there know better than us how their distribution works and they are a very friendly, helpful bunch.

EDIT: I see you have done that already.
deadbang

Post Reply