Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with local setup #2

Open
bhargavvader opened this issue Jan 12, 2021 · 24 comments
Open

Issues with local setup #2

bhargavvader opened this issue Jan 12, 2021 · 24 comments

Comments

@bhargavvader
Copy link

Please post any issues with local setup here!

@theoevans1
Copy link

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
Copy link

@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
Copy link

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
Copy link

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

@egemenpamukcu
Copy link

@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
Copy link

@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

This comment has been minimized.

@bhargavvader
Copy link
Author

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
Copy link

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
Copy link

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
Copy link
Author

@Rui-echo-Pan you can see this link: Computational-Content-Analysis-2020/frequently-asked-questions-spring#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
Copy link

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
Copy link

jinfei1125 commented Jan 16, 2021

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
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

Rui-echo-Pan commented Jan 18, 2021

@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
Copy link

joshuabsilver commented Jan 18, 2021

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
Copy link

jinfei1125 commented Jan 18, 2021

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: Cannot find module lucem_illud #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 OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link ... #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
Copy link

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
Copy link

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
Copy link
Author

@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
Copy link

Raychanan commented Jan 20, 2021

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants