Quantcast
Channel: Forum | SweClockers
Viewing all articles
Browse latest Browse all 219764

Fråga om Python

$
0
0

Jag tar en kurs och där finns följande instruktioner:

Man ska då skapa en mapp som heter pycode och i den installera med hjälp av pip. Då måste ju pip kännas igen, så hur gör man då?

Python Version
First, you must have the 3.11 version of Python installed:

https://www.python.org/downloads/

Pipenv Installation and Configuration
1. If you have not already done so, create a pycode directory somewhere on your development machine.
2. In your terminal run pip install pipenv or depending on your environment, pip3 install pipenv

3. Create a file in your pycode project directory called Pipfile

4. Copy paste the following code into that new Pipfile (or drag and drop the file that is attached to this lecture into your pycode project directory):

5. Inside your pycode project directory, run the following command to install your dependencies from the Pipfile:

pipenv install

6. Run the following command to create and enter a new environment:

pipenv shell

After doing this your terminal will now be running commands in this new environment managed by Pipenv.

Once inside this shell, you can run Python commands just as shown in the lecture videos.

eg:

python main.py

7. If you make any changes to your environment variables or keys, you may find that you need to exit the shell and re-enter using the pipenv shell command.


Viewing all articles
Browse latest Browse all 219764

Latest Images

Clubhouse

Clubhouse

URSKOGEN

URSKOGEN

Trump hotar bomba Iran

Trump hotar bomba Iran

Ny världsordning, utan Trump

Ny världsordning, utan Trump

Kolla in Matt Damon som Odysseus

Kolla in Matt Damon som Odysseus

1979 SAS

1979 SAS

USA-operation i Hormuzsundet

USA-operation i Hormuzsundet



Latest Images

Clubhouse

Clubhouse

URSKOGEN

URSKOGEN

Trump hotar bomba Iran

Trump hotar bomba Iran

Ny världsordning, utan Trump

Ny världsordning, utan Trump

Kolla in Matt Damon som Odysseus

Kolla in Matt Damon som Odysseus

1979 SAS

1979 SAS

USA-operation i Hormuzsundet

USA-operation i Hormuzsundet

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>