Python Forum
What is the difference between Command Prompt and Sublimes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the difference between Command Prompt and Sublimes
#1
There are some Python codes which can only be run in Command Prompt, and can only be run in Sublimes? I am a new user of Python. But I am very familiar with R and Stata. In R, I can install some package and use the library at the same place. But in python, it seems I can only run pip install in command prompt, and I can only use import numpy as np in Sublimes (or some other platform).

I need some explanation to help me understand. Many thanks in advance!
Reply
#2
Most common to use pip from command line,also install packages from PyPi.
If use eg JupyterLab Notebooks then can install with pip and run code in one place.
Example NoteBook.

In your previous Thread they just use the code directly from Repo.
They could have make package,but have not done that as many of these ML is more of one time test or proof of concept.
There is setup.py so if i do quick build.
(suspender_env) G:\div_code\suspender_env\notears (master)
λ pip install -q build

(suspender_env) G:\div_code\suspender_env\notears (master)
λ python -m build
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting build dependencies for sdist...

# Now have a wheel that install
 (suspender_env) G:\div_code\suspender_env\notears\dist (master)
λ pip install notears-3.0-py3-none-any.whl
.....
Now will the import works,not document because they did not do this step.
(suspender_env) G:\div_code\suspender_env\notears\dist (master)
λ ptpython
>>> from notears import utils
>>>
>>> utils.simulate_linear_sem
<function simulate_linear_sem at 0x000001E2FF460FE0>

>>> exit()
Look at Shiny there can easily compare Python and R code.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Facing Problem while opening a file through command prompt vlearner 4 1,922 Jan-30-2022, 08:10 AM
Last Post: snippsat
  Noob warning: trying to use pip to install pytest and pep8 in Command Prompt adifrank 4 5,345 Dec-20-2020, 04:23 AM
Last Post: adifrank
  Running Python in Command Prompt Anwar 3 3,089 Nov-15-2020, 03:15 PM
Last Post: snippsat
  starting python from windows command prompt MaartenRo 4 2,857 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  Will not print in command prompt PandaCode 12 13,128 May-06-2020, 03:48 AM
Last Post: PandaCode
  Script works when executed from command prompt but not when executed in SDP Tippex 0 2,019 Apr-07-2020, 04:26 PM
Last Post: Tippex
Question Difference between Python's os.system and Perl's system command Agile741 13 6,860 Dec-02-2019, 04:41 PM
Last Post: Agile741
  Can read files in command prompt but not IDE Exsul 2 2,175 Sep-13-2019, 01:40 AM
Last Post: jsira2003
  command prompt saisankalpj 8 5,280 Nov-28-2018, 04:13 AM
Last Post: saisankalpj
  Command Prompt Issue benzenegirl 2 2,582 Oct-25-2018, 03:09 PM
Last Post: The_Raven

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020