How to paste code to python shell?

Hi,
I try to learn how to create a Python library. But I have a problem with activating a virtual environment. To be more specific: I was told to do this:


… I opened my console:

image

and paste the mentioned code. But It was rejected (and I couldn’t find on the internet why is that - probably the solution is simple, but I don’t even know how to post a proper question to find it):

I tried to pate this code without dollar sing but it won’t work too, also replacing $ with ! won’t work.

image

I don’t know why it doesn’t work and what version of this code should I use.

can you help me?

@drill_n_bass $ represents the prompt on some terminals. In the case of the conda prompt, it is the greater than sign >. In this case, you do not need to specify the $. Just enter pip install <package_name> (replace package_name with the actual name of the package)–you can also rid the python -m as the conda prompt should know where pip is (in the PATH in your system environment variables), unless you did not include it.

Here’s how to add pip to PATH

1 Like