UChicago-CCA-2021 / Frequently-Asked-Questions

Repository to ask questions - please use the issues page to ask your questions.
0 stars 0 forks source link

Issues with local setup #2

Open bhargavvader opened 3 years ago

bhargavvader commented 3 years ago

Please post any issues with local setup here!

theoevans1 commented 3 years ago

I'm getting an error when I try to set up the notebooks. Here's a screenshot of the issue.

Screen Shot 2021-01-12 at 3 19 01 PM
jacyanthis commented 3 years ago

@theoevans1 There's a language model "en" that you need to download first. Information is at this Canvas thread, and running this command will download it:

python -m spacy download en

egemenpamukcu commented 3 years ago

I'm trying to create the repository using the given command but it tells me that "repo already exists" and I cannot see the repository on GitHub.

(base) Egemens-MacBook-Pro:Desktop egemenpamukcu$ cd python_exercises/
(base) Egemens-MacBook-Pro:python_exercises egemenpamukcu$ cta2021-setup-user
Creating your repo at: /Users/egemenpamukcu/Desktop/python_exercises/Homework-Notebooks
A repo will be created on your GitHub account, to do this you will need to input your GitHub username and password
GitHub Username: egemenpamukcu
Password: 
Creating a new repo
Repo already exists
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 85, in makeStudentRepo
    d = makeNewRepo(data, auth=auth)
  File "/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 157, in makeNewRepo
    return postGithubURL(target, data, auth = auth)
  File "/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 143, in postGithubURL
    raise RuntimeError('Invalid request: {}\n{}'.format(url, r.text))
RuntimeError: Invalid request: https://api.github.com/user/repos
{"message":"Requires authentication","documentation_url":"https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/bin/cta2021-setup-user", line 8, in <module>
    sys.exit(makeUser())
  File "/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/makeUser.py", line 15, in makeUser
    makeStudentRepo()
  File "/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 89, in makeStudentRepo
    d = getGithubURL('/repos/{}/{}'.format(username, name), auth = auth)
  File "/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 123, in getGithubURL
    raise RuntimeError('Invalid request: {}\n{}'.format(url, r.text))
RuntimeError: Invalid request: https://api.github.com/repos/egemenpamukcu/Homework-Notebooks
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"}
(base) Egemens-MacBook-Pro:python_exercises egemenpamukcu$ 
MOTOKU666 commented 3 years ago

@egemenpamukcu I had the same problem due to the wrong password. Maybe you can try copy and paste your token number?

egemenpamukcu commented 3 years ago

@egemenpamukcu I had the same problem due to the wrong password. Maybe you can try copy and paste your token number?

@MOTOKU666 it asks for my username and then my password, but it does not ask for the token number. I tried entering different passwords and it never returns a "wrong password" error, it is always "Repo already exists". I made sure that I entered the password I use to login my GitHub profile but it still does not work for me. I googled the error and weirdly there seems to be no relevant posts anywhere.

What did you do to solve this?

MOTOKU666 commented 3 years ago

@egemenpamukcu You can check the tutorial on canvas. The password is not your GitHub password but your personal access token. If you do not have one, follow the tutorial, and hopefully, it will work. Here's the link to the canvas page: https://canvas.uchicago.edu/courses/33672/pages/accessing-computational-resources-and-corpora

image

jcvotava commented 3 years ago

I'm trying to install Python and git for the first time on my local Windows laptop. I installed anaconda, and git via Cygwin, but I can't seem to install the class package. At first I got an error which was solved by updating my Windows C++ package (?). Now, I get a verbose error when installing the class package on the step about "building wheels for traits" (?). Error attached below as text file - any help would be appreciated. votava_install_error.txt

bhargavvader commented 3 years ago

It seems most of these issues have been solved - great job, on the teamwork! I'm opening two other issues bases on the language models and git set up as well.

@jcvotava can you please open a different issue with your question? Other Windows users might also have that issue and it would be good to have a separate thread for it.

Raychanan commented 3 years ago

The guide advises me to copy and paste jupyter notebooks somewhere else. But do I avoid this practice in the following way?

fork + clone + create a new branch

Thanks for your help!

Rui-echo-Pan commented 3 years ago

I'm trying to install the class package, while I met with the problems:

截屏2021-01-16 上午12 48 11

This failure would prevent me from importing lucem_illud. Could anyone help me out?

bhargavvader commented 3 years ago

@Rui-echo-Pan you can see this link: https://github.com/Computational-Content-Analysis-2020/frequently-asked-questions-spring/issues/8 for students who had a similar issue and solved it. It seems to be a problem with Windows.

@Raychanan is this to avoid having your notebooks overwritten? You can just make a copy in the same place, and have one renamed as your HW submission and the other as the original file name.

jinfei1125 commented 3 years ago

Hi! I am using a win10 system and git bash to install the package, but it said permission denied hp@DESKTOP-FAT2SCA MINGW64 /d/UChicago-2021-Winter/computational-content-analysis/notebook $ python -m pip install -U git+git://github.com/UChicago-Computational-Content-Analysis/lucem_illud.git bash: /c/Users/hp/AppData/Local/Microsoft/WindowsApps/python: Permission denied I tried to google it, and use the cmd in windows as admin to run the code as this discussion suggests At first, it runs successfully,

git cmd

but I get a new error:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\hp\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\sklearn\\datasets\\tests\\data\\openml\\292\\api-v1-json-data-list-data_name-australian-limit-2-data_version-1-status-deactivated.json.gz'

I am really new to this environment thing... My Anaconda is in Disk C but I tried to install the package in Disk D (I created a folder to store all course related file). Maybe this is the problem?

jinfei1125 commented 3 years ago

Hi, the above problem still exits and I tried to install the package in jupyter notebook directly, but I still got an error...Please forgive me if my question is too naive T^T Thanks in advance!

ERROR: Command errored out with exit status 1: 'D:\Software\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-mkfx9e4a\\traits\\setup.py'"'"'; __file__='"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-mkfx9e4a\\traits\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\hp\AppData\Local\Temp\pip-record-8otn5osz\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Software\Anaconda3\Include\traits' Check the logs for full command output.

bhargavvader commented 3 years ago

Hello @jinfei1125 , it seems to be a problem with the length of the pathname in Windows 10 - I found this out with a quick google search of your error.

These are some links that might help:

https://stackoverflow.com/questions/54778630/could-not-install-packages-due-to-an-environmenterror-errno-2-no-such-file-or

https://stackoverflow.com/questions/62110398/i-cant-install-tensorflow-on-win10

https://stackoverflow.com/questions/62754034/installed-scikit-learn-doesnt-work-properly

I don't use Windows so I don't have any other real advice - but those links seem to be very similar to the issue you are facing!

jinfei1125 commented 3 years ago

Hi! @bhargavvader Thank you sooo much for your advice and links! Now I successfully installed lucem-illud in my win10 computer after downloading vs c++ following advice from thislink !

successfully-installed

But a new problem occurs, when I run the second cell in jupyter notebook, it said No module named 'lucem_illud'......

cannot-import

At first, I thought this happen because the directory which the package is installed hasn't been added to path, but after I add the directory showed in my command line warning message, it still shows No module named 'lucem_illud'...

bhargavvader commented 3 years ago

Hmmm, this might be to conflicting installation paths with an environment and Jupyter not recognising it. Check out this issue #8 , it might be helpful.

Rui-echo-Pan commented 3 years ago

@bhargavvader Thank you! But I couldn't solve it with the advice in that link. I use Mac, and I met with exactly the same problem with Sunnyleee (who also uses Mac) in the link you provided! It seems that downloading c++ tools didn't function, as I tried, but there is no option for installing C++, so I installed c++ tool here. But the error still exists.

截屏2021-01-18 下午11 05 27 截屏2021-01-19 上午12 20 48
joshuabsilver commented 3 years ago

I think I'm having a similar issue as @egemenpamukcu and @MOTOKU666 I am unable to enter my personal access token, I am instead ask to enter a password but cannot enter text on that line (small key icon shows up) When I hit enter I get this error message:

Creating a new repo Repo already exists Traceback (most recent call last): File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 85, in makeStudentRepo d = makeNewRepo(data, auth=auth) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 157, in makeNewRepo return postGithubURL(target, data, auth = auth) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 143, in postGithubURL raise RuntimeError('Invalid request: {}\n{}'.format(url, r.text)) RuntimeError: Invalid request: https://api.github.com/user/repos {"message":"Requires authentication","documentation_url":"https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/joshuasilver/opt/anaconda3/bin/cta2021-setup-user", line 8, in sys.exit(makeUser()) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/makeUser.py", line 15, in makeUser makeStudentRepo() File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 89, in makeStudentRepo d = getGithubURL('/repos/{}/{}'.format(username, name), auth = auth) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 123, in getGithubURL raise RuntimeError('Invalid request: {}\n{}'.format(url, r.text)) RuntimeError: Invalid request: https://api.github.com/repos/joshuabsilver/Homework-Notebooks {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"} (base) Joshuas-MacBook-2:computationalcontentanalysis joshuasilver$

jinfei1125 commented 3 years ago

Thanks for @bhargavvader 's all useful suggestions and now I finally fixed all problems in my win10. I would like to share some links that other win10 users might find useful when they have similar problems!

My computer: Win10 Home, Anaconda, Git, Github Desktop (I use Github Desktop to git clone the week1 notebook to my local repository so I skip the step to input my username and token thing.)

All of them happen when I run pip install git+git://github.com/UChicago-Computational-Content-Analysis/lucem_illud.git in my command line!

  1. Permission denied: run cmd as administrator

  2. ERROR: Could not install packages due to an EnvironmentError: [Errno 2] path name too long -- enable long pathname

  3. error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools --This link seems dead, download it here as this link suggests. When installing you only need to choose the c++ package. Here I successfully installed the package and started to run week1 jupyter notebook! But still got some errors...

  4. No module named 'lucem_illud' : When I install the package I got a warning message: WARNING: The scripts cygdb.exe, cython.exe and cythonize.exe are installed in 'C:\Users\hp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. What I did first is to add this path to my environment followed instruction from this link, but it still shows the error. Then I run the following codes in my command line as Bhargav discussed here: #8 : pip3 install ipykernel --upgrade and python3 -m ipykernel install --user

  5. Can't find model 'en'. It doesn't seem to be a shortcut link This is the last error I encountered and luckily it has been discussed in #6

So that's all the problems I encountered and solved! If you are having similar problems, hopefully they can be somewhat useful to you ;D

egemenpamukcu commented 3 years ago

I think I'm having a similar issue as @egemenpamukcu and @MOTOKU666 I am unable to enter my personal access token, I am instead ask to enter a password but cannot enter text on that line (small key icon shows up) When I hit enter I get this error message:

Creating a new repo Repo already exists Traceback (most recent call last): File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 85, in makeStudentRepo d = makeNewRepo(data, auth=auth) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 157, in makeNewRepo return postGithubURL(target, data, auth = auth) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 143, in postGithubURL raise RuntimeError('Invalid request: {}\n{}'.format(url, r.text)) RuntimeError: Invalid request: https://api.github.com/user/repos {"message":"Requires authentication","documentation_url":"https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/joshuasilver/opt/anaconda3/bin/cta2021-setup-user", line 8, in sys.exit(makeUser()) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/makeUser.py", line 15, in makeUser makeStudentRepo() File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 89, in makeStudentRepo d = getGithubURL('/repos/{}/{}'.format(username, name), auth = auth) File "/Users/joshuasilver/opt/anaconda3/lib/python3.8/site-packages/lucem_illud/_backend/github.py", line 123, in getGithubURL raise RuntimeError('Invalid request: {}\n{}'.format(url, r.text)) RuntimeError: Invalid request: https://api.github.com/repos/joshuabsilver/Homework-Notebooks {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"} (base) Joshuas-MacBook-2:computationalcontentanalysis joshuasilver$

Hi Joshua, try entering the personal access token by hand when it asks you for your password. I initially thought it would specifically ask me for my token after I entered my password but that is not the case.

You can actually enter text when the small key icon is displayed, it just does not show up on the screen. Try typing your token and pressing enter.

Hope this helps.

Rui-echo-Pan commented 3 years ago

Good news here: I have solved the problem of setting up the class package as mentioned above. Mac, macOS Solution: Install XCode The logic behind the solution: many students solved the problem by reinstalling VSCode with C++ settled, within their Windows. Similarly, by installing XCode, C++ is naturally set up.

bhargavvader commented 3 years ago

@joshuabsilver , @egemenpamukcu has the solution to your problem. I also discussed it on #7 .

Happy to hear @Rui-echo-Pan and @jinfei1125 have managed to get their installation issues fixed! :)

Raychanan commented 3 years ago

Hi, I'm wondering if you could see my updates on homework? I'm trying to ensure I've successfully submitted it. The file name is 1-intro_HW_submit.ipynb Thanks!

bhargavvader commented 3 years ago

@Raychanan - I see it - you can see it yourself by going through your fork of the repository!