osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem finding my folder via terminal


Hi Tamara, and welcome!

My response is written below. Please ensure your reply is to the group, 
not just to me personally, thank you.



On Wed, 06 Jun 2018 09:19:17 -0700, T Berger wrote:

> I?m learning Python on my own and have been stuck for two days trying to
> get modules I created into site-packages. As a trial step, we were asked
> to change directly into the folder containing our modules.

Who asked you to do that?

>From looking at the commands you give below, you are using Linux or Mac 
OS, is that right?


> I typed ?cd mymodules? per instructions, but got this error message:
> ?-bash: cd: mymodules: No such file or directory.? I saved mymodules to 
> my documents. What is going wrong here?


My guess is that the mymodules folder is inside the "my documents" 
folder, so when you ask the computer to change into the mymodules folder, 
it can't see it.

Remember that Linux is case-sensitive, so you have to get the exact upper/
lower case mix correct. Try:

cd "My Documents/mymodules"

and see if that works. Notice that the space inside "My Documents" means 
you need to use quotation marks. Adjust the uppercase "My Doc..." to 
lowercase "my doc..." if need be.

If it doesn't work, try this:

- start typing the command "cd My" *WITHOUT* the quote marks;

- hit the TAB key;

- hopefully the bash interpreter (the shell you are using) will 
  auto-complete the name of the folder and save you typing the rest;

- then start type "mym" (without the quotes!) and hit TAB again;

- and hopefully the rest of the name will be auto-completed;

- and finally hit ENTER

and with luck that will work.

If not, we'll need some more information about the computer you are 
using: what OS are you using (Mac, Linux, Windows, something else), what 
shell are you using, perhaps a file listing of your home directory.

(Which I'm reluctant to ask for, as that potentially may show personal 
details you might not want to share with the world.)


> When I tried to create a distribution file, I typed ?192:~ TamaraB$
> mymodules$ python3 setup.py sdist.? I got this error message: ?-bash:
> mymodules$: command not found.? What should I do?

The "mymodules$" part you saw in the instructions is not part of the 
command you need to type. That is intended to be the prompt.

In your case, because you didn't successfully cd into the mymodules 
folder, your prompt hasn't changed from 

    192:~ TamaraB$

(I'm not sure what the 192 part means. Does that increase each time you 
type a command?)

Once you successfully cd into the mymodules folder, the prompt will 
hopefully be:

    192:mymodules$

or something similar to that. But whatever it is, you don't need to type 
the prompt as part of your commands.

By the way, thank you for giving so much detail in your request for help! 
That was very helpful for me to help you. Many supposedly professional 
programmers don't give anywhere near as useful detail, thinking we can 
just read their mind and magically know what is going on. Keep up the 
good work!



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson