Can't install nor import delorean module - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Can't install nor import delorean module (/thread-35344.html) |
Can't install nor import delorean module - Tek - Oct-22-2021 Good Friday evening to you all Pythoners. I believe this is my first post here in your forums and hope this is the correct place for it. I'm using Jupyter notebook in VSCode and am trying to import the delorean module. I've added it to a requirements.txt file -> Quote:delorean==1.0.0 and install it from the terminal thus -> pip install -r requirements.txt It starts to build everything fine and then I get the following error message: Quote:ERROR: Command errored out with exit status 1: BUT, after that it says that delorean was installed : Quote: Running setup.py clean for delorean When I try to import it I get the ModuleNotFoundError that I'm sure you're all familiar with and won't repeat it. Can someone give me a clue to what's happening and more importantly - how to fix it?? Thank you PS When I had delorean installed in another directory, in a different venv it installed without issue, and I still got the module not found error when I tried to import it. checking the install it told me all requirements were already satisfied but it wouldn't import. That's when I deactivated and deleted that venv, made it in another directory and now get that long error message. RE: Can't install nor import delorean module - Larz60+ - Oct-23-2021 try (from command line): pip install delorean then to see if it's properly installed: pip list you can then update your requirements.txt with: pip freeze > requirements.txt
RE: Can't install nor import delorean module - snippsat - Oct-23-2021 It try to build wheel then it will use setup.py and should work with that to. So can first try pip install wheel ,but should not get that error message doing that,so something else is wrong.Here a quick run and name your virtual environment so no conflict occurs. # Make tom@tom-VirtualBox:~$ python -m venv del_env tom@tom-VirtualBox:~$ cd del_env/ # Activate tom@tom-VirtualBox:~/del_env$ source bin/activate # Make requirements.txt (del_env) tom@tom-VirtualBox:~/del_env$ vi requirements.txt (del_env) tom@tom-VirtualBox:~/del_env$ cat requirements.txt delorean==1.0.0 requests==2.22.0 (del_env) tom@tom-VirtualBox:~/del_env$ ls bin include lib lib64 pyvenv.cfg requirements.txt # Install (del_env) tom@tom-VirtualBox:~/del_env$ pip install -r requirements.txt Collecting delorean==1.0.0 Downloading Delorean-1.0.0.tar.gz (18 kB) ..... Using legacy 'setup.py install' for delorean, since package 'wheel' is not installed. Installing collected packages: tzdata, six, pytz-deprecation-shim, pytz, urllib3, tzlocal, python-dateutil, idna, humanize, chardet, certifi, babel, requests, delorean Running setup.py install for delorean ... done Successfully installed babel-2.9.1 certifi-2021.10.8 chardet-3.0.4 delorean-1.0.0 humanize-3.12.0 idna-2.8 python-dateutil-2.8.2 pytz-2021.3 pytz-deprecation-shim-0.1.0.post0 requests-2.22.0 six-1.16.0 tzdata-2021.4 tzlocal-4.0.1 urllib3-1.25.11 # Test that it work [python]Python 3.9.6 (default, Aug 3 2021, 16:49:17) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from delorean import Delorean >>> >>> d = Delorean() >>> d Delorean(datetime=datetime.datetime(2021, 10, 23, 9, 17, 26, 848343), timezone='UTC')See that this message comes legacy 'setup.py install' for delorean, since package 'wheel' is not installed. ,so even without wheel installed it should work as it use setup.py install .Pendulum is better choice as delorean don't get updated enough. RE: Can't install nor import delorean module - Tek - Oct-27-2021 (Oct-23-2021, 10:02 AM)snippsat Wrote: Pendulum is better choice as delorean don't get updated enough. Thanks for your replies I believe I have it working now. I'm going to continue using Delorean as it's being used in the tutorial I'm working through at the moment. I'll be looking into Pendulum when I'm move familiar with things. I appreciate your help |