I'm still very green with python, pip, bash, and symlinks. My machine was working just fine, and I was able to run python CLIs from my computer without issue until I needed to run a serverless resource locally for debugging. I followed some instructions on our README to get everything going, and ever since then my machine is throwing errors trying to find python modules, that I can clearly see are still there. I've been searching for a solution that is similar to mine, but haven't found a fix yet.
I'm on a Mac running 10.14.6, using a Virtual Env that uses Python 3.7, and iTerm2 with zsh.
Here are the commands I used in the terminal that borked my local the dev environment.
$ brew install pyenv
$ pyenv install 3.7.5
$ pyenv global 3.7.5
This resulted in me not being able to to run pip install. I have since used brew to uninstall pyenv, and reinstall python and am now able to run pip install commands.
This command however, I do not understand, and have not been able to undo. I suspect it is the culprit of my python modules issues, but am not completely sure to be honest.
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
Here is the traceback from the python module error if that is helpful
File "/Users/<user>/<dir>/<repo dir>/.venv/bin/<evolv>", line 11, in <module>
load_entry_point('evolv==0.1', 'console_scripts', 'evolv')()
File "/Users/<user>/<dir>/<repo dir>/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/<user>/<dir>/<repo dir>/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/Users/<user>/<dir>/<repo dir>/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/Users/<user>/<dir>/<repo dir>/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'experiments'
I have triple checked that I ran
pip install -r requirements.txt
And
python setup.py install
Which is required for this CLI to work. A thing to note, our README instructions were to use
python setup.py install -e .
However that threw an error that the -e flag was unknown. I am not sure if this matters. If anyone has some insight that can point me in the direction of a fix that would be most appreciated. And if someone can help me better understand the bash command I used I will be eternally grateful as I am desperately trying to understand bash.