Hey y’all,
I’ve been trying to get my workspace set up to begin making my cs101 portfolio project.
This is the lesson in which they teach you how to set up pip:
https://www.codecademy.com/paths/computer-science/tracks/cspath-cs-101/modules/cspath-modules/articles/learn-python-pipenv
I’m able to follow along until around 20:20 when the problems crop up.
I’ve been able to install pip, create folders and files (the pip files and pip.lock files), as well as install modules (numpy), but when I attempt to run ‘pipenv shell’ instead of the terminal switching to Python like in the video it changes to pipenv. From this point on I’m unable to follow along as the subsequent commands such as ‘import numpy’ or ‘print(numpy.version)’ returns
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
I’ve spent at least 5 hours trying to slog through tutorials to find what I’ve done wrong. The only relevant help I’ve found was someone saying to uninstall Python and pip and re-install them (making sure Python’s path option is ticked). While I was able to re-install Python, when I attempt to uninstall pip I get this error:
Found existing installation: pip 21.2.4
WARNING: Value for bin_prefix does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\bin
sysconfig: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\Scripts
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Uninstalling pip-21.2.4:
Would remove:
c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip-21.2.4.dist-info\*
c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\*
Proceed (Y/n)? y
ERROR: Exception:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 815, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\windowsapps\\pythonsoftwarefoundation.python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\pip-21.2.4.dist-info\\' -> 'C:\\Users\\Houston\\AppData\\Local\\Temp\\pip-uninstall-817lt_6t'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main
status = self.run(options, args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\commands\uninstall.py", line 93, in run
uninstall_pathset = req.uninstall(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_install.py", line 633, in uninstall
uninstalled_pathset.remove(auto_confirm, verbose)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_uninstall.py", line 384, in remove
moved.stash(path)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_uninstall.py", line 281, in stash
renames(path, new_path)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\utils\misc.py", line 331, in renames
shutil.move(old, new)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 833, in move
rmtree(src)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 749, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 627, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 625, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\windowsapps\\pythonsoftwarefoundation.python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\pip-21.2.4.dist-info\\entry_points.txt'
I frankly have no clue what I am doing. I just want to get this sorted so I can actually write code.
Thank you for your time!